.camera-grid-hidden {
    display: none;
}

.call-status {
    margin: 0 0 14px;
    color: #b8bbc8;
    font-size: 12px;
}

.video-grid {
    display: grid;
    flex: 0 1 auto;
    width: 100%;
    max-height: min(34vh, 360px);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    overflow-y: auto;
}

.video-frame {
    position: relative;
    min-height: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid #ffffff14;
    border-radius: 16px;
    background: #303340;
}

#videoGrid .video-frame[hidden] {
    display: none;
}

.video-frame video {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: block;
    object-fit: contain;
    background: #20212b;
}

.video-frame-footer {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    pointer-events: none;
}

.video-label {
    max-width: 100%;
    overflow: hidden;
    padding: 6px 9px;
    border-radius: 7px;
    background: rgba(20, 21, 30, 0.68);
    color: #fff;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-volume {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    width: min(176px, 100%);
    margin-left: auto;
    padding: 2px 8px 2px 3px;
    border-radius: 8px;
    background: #1d1f2bea;
    color: #fff;
    font-size: 11px;
    pointer-events: auto;
}

.screen-volume[hidden] {
    display: none;
}

.screen-volume input {
    width: 100%;
    height: 28px;
    min-width: 0;
    accent-color: #a9a4ff;
    cursor: pointer;
}

.screen-volume output {
    min-width: 4ch;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.screen-mute-button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.screen-mute-button:hover,
.screen-mute-button:focus-visible {
    background: #343746;
}

.screen-mute-button[aria-pressed='true'] {
    color: #ff9fae;
}

.screen-mute-button[aria-pressed='true'] .screen-sound-on,
.screen-mute-button[aria-pressed='false'] .screen-sound-off {
    display: none;
}

.video-frame-control {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #ffffff38;
    border-radius: 9px;
    background: #1d1f2bea;
    color: #fff;
}

.video-focus-button {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: flex-end;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.video-frame.is-focused .video-focus-button {
    cursor: zoom-out;
}

.has-focused-video .video-frame:not(.is-focused) .video-frame-footer {
    right: 6px;
    bottom: 6px;
    left: 6px;
}

.has-focused-video .video-frame:not(.is-focused) .video-focus-button {
    padding: 6px;
}

.has-focused-video .video-frame:not(.is-focused) .video-focus-button .video-frame-control {
    width: 34px;
    height: 34px;
}

.video-collapse-icon,
.video-frame.is-focused .video-expand-icon {
    display: none;
}

.video-frame.is-focused .video-collapse-icon {
    display: block;
}

.video-flip-button {
    position: absolute;
    top: 10px;
    left: 10px;
    cursor: pointer;
}

.video-flip-button[hidden] {
    display: none;
}

.video-flip-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.video-focus-button:hover .video-frame-control,
.video-flip-button:hover:not(:disabled) {
    background: #343746;
}

.video-focus-button:focus-visible {
    outline: 2px solid #aaa3ff;
    outline-offset: -4px;
}

.video-flip-button:focus-visible {
    outline: 2px solid #aaa3ff;
    outline-offset: 2px;
}

.empty-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.empty-frame[hidden] {
    display: none;
}

.empty-frame strong {
    font-size: 16px;
}
.empty-frame small {
    margin-top: 8px;
    color: #aeb1bd;
    font-size: 12px;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border: 1px solid #ffffff20;
    border-radius: 17px;
    color: #aaa5ff;
    font-size: 26px;
}

.call-toolbar {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 18px;
}

.control-button {
    border: 1px solid #ffffff20;
    border-radius: 9px;
    padding: 10px 13px;
    background: #303340;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.control-button:hover {
    background: #3a3d4b;
}
.control-button.leave-button {
    background: #d95670;
    border-color: #d95670;
}

.room-card-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: space-between;
    padding: 8px var(--room-content-inset);
    background: #242631;
    color: #8e92a1;
    color: var(--muted);
    font-size: 11px;
    transition: padding-inline-start 200ms ease;
}

.room-participant-status {
    position: relative;
}

.room-version-tooltip {
    position: absolute;
    bottom: calc(100% + 7px);
    right: 0;
    z-index: 2;
    padding: 6px 8px;
    border-radius: 6px;
    background: #1f202a;
    color: #e4e5eb;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
}

.room-participant-status:hover .room-version-tooltip,
.room-participant-status:focus-within .room-version-tooltip {
    opacity: 1;
}

.room-footer-actions {
    --room-action-size: 40px;
    --room-action-gap: 6px;
    display: inline-flex;
    align-items: center;
    gap: var(--room-action-gap);
    transition: gap 200ms ease;
}

.room-footer-actions[hidden] {
    display: none;
}

.hang-up-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: var(--room-action-size);
    height: var(--room-action-size);
    padding: 0 13px;
    border: 0;
    border-radius: 8px;
    background: #be233a;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: height 200ms ease, min-width 200ms ease, padding-inline 200ms ease, gap 200ms ease;
}

.hang-up-action:hover {
    background: #a51c31;
}

.hang-up-label {
    max-width: 10em;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 200ms ease, opacity 160ms ease;
}

.participants-collapsed .room-footer-actions {
    --room-action-gap: 4px;
    --room-action-size: calc((var(--room-sidebar-width) - var(--room-action-gap)) / 2);
}

.participants-collapsed .hang-up-action {
    gap: 0;
    padding-inline: 0;
}

.participants-collapsed .hang-up-label {
    max-width: 0;
    opacity: 0;
}

.room-settings-button,
.room-settings-close {
    display: inline-grid;
    place-items: center;
    border: 1px solid #444859;
    border-radius: 8px;
    background: #303342;
    color: #dedfec;
    cursor: pointer;
}

.room-settings-button {
    width: var(--room-action-size);
    height: var(--room-action-size);
    padding: 0;
    transition: width 200ms ease, height 200ms ease;
}

.room-footer-actions svg {
    flex: none;
    transition: width 200ms ease, height 200ms ease;
}

.participants-collapsed .room-footer-actions svg {
    width: 15px;
    height: 15px;
}
.room-settings-close {
    width: 32px;
    height: 32px;
    font:
        24px/1 Arial,
        sans-serif;
}
.room-settings-button:hover,
.room-settings-close:hover {
    background: #3b3e51;
    color: #fff;
}

.room-settings-dialog {
    width: min(420px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 16px;
    overflow: auto;
    border: 1px solid #444859;
    border-radius: 16px;
    background: #252732;
    color: #f3f3fc;
    font-size: 13px;
    box-shadow: 0 10px 28px #10111955;
    opacity: 0;
    transform: translateY(6px);
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        display 160ms allow-discrete,
        overlay 160ms allow-discrete;
}

.room-settings-dialog[open] {
    opacity: 1;
    transform: none;
}

.room-settings-dialog::backdrop {
    background: #11121a99;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition:
        opacity 160ms ease,
        display 160ms allow-discrete,
        overlay 160ms allow-discrete;
}

.room-settings-dialog[open]::backdrop {
    opacity: 1;
}

@starting-style {
    .room-settings-dialog[open] {
        opacity: 0;
        transform: translateY(6px);
    }

    .room-settings-dialog[open]::backdrop {
        opacity: 0;
    }
}

.room-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.room-settings-header h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}
.room-settings-section {
    display: block;
    width: 100%;
    border: 1px solid #3b3e4d;
    border-radius: 9px;
    background: #2c2e3b;
    color: #eeeefa;
    font: inherit;
    font-size: inherit;
    text-align: left;
}

button.room-settings-section:disabled {
    margin-bottom: 6px;
    padding: 8px 11px;
    color: #a1a4b5;
    cursor: not-allowed;
}

.room-sound-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 11px;
    cursor: pointer;
}

.room-sound-toggle::before {
    content: '';
    border: 5px solid transparent;
    border-left-color: #a9a4ff;
    transform-origin: 2px 50%;
    transition: transform 160ms ease;
}

.room-sound-toggle[aria-expanded='true'] {
    border-radius: 9px 9px 0 0;
}

.room-sound-toggle[aria-expanded='true']::before {
    transform: rotate(90deg);
}

.room-volume {
    padding: 0 11px 8px;
    line-height: 1.35;
    border: 1px solid #3b3e4d;
    border-top: 0;
    border-radius: 0 0 9px 9px;
    background: #2c2e3b;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        visibility 0s 160ms;
}

.room-sound-toggle[aria-expanded='true'] + .room-volume {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
}
.room-volume-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid #3b3e4d;
}

.room-volume-label output {
    color: #bcb8ff;
    font-variant-numeric: tabular-nums;
}
.room-volume input {
    display: block;
    width: 100%;
    height: 23px;
    margin: 3px 0 0;
    accent-color: #8178ff;
}
.room-volume p {
    margin: 0;
    color: #b1b3c3;
    font-size: 11px;
}

.room-volume .room-volume-label:not(:first-child) {
    margin-top: 7px;
}

.room-volume select {
    display: block;
    width: 100%;
    min-height: 36px;
    margin: 4px 0;
    padding: 4px 7px;
    border: 1px solid #444859;
    border-radius: 6px;
    background: #252732;
    color: inherit;
    font: inherit;
}

.room-settings-dialog.participant-audio-dialog {
    width: min(300px, calc(100% - 24px));
}

.participant-audio-dialog h2 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.participant-volume {
    padding: 9px 11px;
    border-top: 1px solid #3b3e4d;
    border-radius: 9px;
    visibility: visible;
    opacity: 1;
    transform: none;
}

.participant-volume .room-volume-label {
    padding: 0;
    border: 0;
}

.participant-volume-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.participant-volume-controls input {
    min-width: 0;
    margin: 0;
}

.participant-volume-mute img {
    width: 17px;
    height: 22px;
    object-fit: contain;
}

@media (max-width: 760px) {
    .room-settings-dialog {
        width: min(360px, calc(100% - 24px));
        padding: 12px;
        font-size: 12px;
    }

    .room-settings-header h2 {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .room-card-footer,
    .room-version-tooltip,
    .room-footer-actions button,
    .room-footer-actions svg,
    .hang-up-label,
    .room-settings-dialog,
    .room-settings-dialog::backdrop,
    .room-sound-toggle::before,
    .room-volume {
        transition: none;
    }
}
