@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@500&display=swap');

/*--------------------------------------------------------------
# Root settings
--------------------------------------------------------------*/

:root {
    /* common */
    --navbar-bg: rgba(0, 0, 0, 0.2);
    --body-bg: radial-gradient(#393939, #000000);
    --border: 0.5px solid rgb(255 255 255 / 32%);
    --dd-color: #ffffff;

    --msger-top: 50%;
    --msger-left: 50%;
    --msger-height: 680px;
    --msger-width: 420px;
    --msger-bubble-width: 85%;

    --caption-top: 50%;
    --caption-left: 50%;
    --caption-height: 680px;
    --caption-width: 420px;

    /* video iframe */
    --iframe-width: 640px;
    --iframe-height: 480px;

    /* whiteboard resize */
    --wb-width: 1920px;
    --wb-height: 1080px;

    /* my settings */
    --mySettings-select-w: 100%;

    /* btns hover scale 110% zoom */
    --btns-hover-scale: scale(1.1);
    --hover-color: grey;

    /* video elem border color */
    --elem-border-color: none;

    --tab-btn-active: rgb(30 29 29);

    --btn-bar-bg-color: #ffffff;
    --btn-bar-color: #000000;

    /* bottom buttons bar horizontal default */
    --bottom-btns-top: auto;
    --bottom-btns-left: 50%;
    --bottom-btns-bottom: 0;
    --bottom-btns-translate-X: -50%;
    --bottom-btns-translate-Y: 0%;
    --bottom-btns-margin-bottom: 18px;
    --bottom-btns-flex-direction: row;

    /* dark theme */
    --body-bg: radial-gradient(#393939, #000000);
    --msger-bg: radial-gradient(#393939, #000000);
    --msger-private-bg: radial-gradient(#393939, #000000);
    --wb-bg: radial-gradient(#393939, #000000);
    --select-bg: #2c2c2c;
    --box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);

    /* chat msg boble */
    --left-msg-bg: #252d31;
    --right-msg-bg: #056162;
    --private-msg-bg: #6b1226;

    /* volume detected */
    --volume-up: 0px 8px 16px 0px rgb(249, 253, 0);

    /* video avatar img size */
    --vmi-wh: 15vw;
    /*
        https://developer.mozilla.org/it/docs/Web/CSS/object-fit
    */
    --video-object-fit: cover;
    --second-video-object-fit: cover;
}

* {
    outline: none;
    font-family: 'Montserrat';
}

/*--------------------------------------------------------------
# Body Html setup
--------------------------------------------------------------*/

html,
body {
    top: 0 !important;
    width: 100%;
    height: 100%;
    margin: auto;
    overflow: hidden;
    background: var(--body-bg);
    /* background: url('../images/bg.svg'); */
}

/*--------------------------------------------------------------
# Google Translate
--------------------------------------------------------------*/

.skiptranslate iframe,
.goog-te-banner-frame.skiptranslate,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO,
#goog-gt-tt,
#goog-gt-tt *,
#goog-gt-vt,
#goog-gt-vt * {
    display: none !important;
}

#google_translate_element select {
    background: var(--select-bg) !important;
}

/*--------------------------------------------------------------
# Loading...
--------------------------------------------------------------*/

#loadingDiv {
    z-index: 9999;
    color: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.7);
    box-shadow: var(--box-shadow);
}

#loadingDiv h1 {
    font-size: 60px;
    font-family: 'Montserrat';
}

#loadingDiv img {
    margin-top: 5px;
    margin-bottom: 5px;
}

#loadingDiv pre {
    padding: 5px;
    font-family: 'Montserrat';
}

/*--------------------------------------------------------------
# Init User
--------------------------------------------------------------*/

.init-modal-size {
    width: 1024px !important;
    height: auto !important;
}

.init-user {
    z-index: 9999;
    display: flex;
    padding: 5px;
}

.init-video-container {
    position: relative;
    width: 100%;
}

.init-video-container video {
    z-index: 0;
    position: relative;
    height: 240px;
}

.initComands {
    width: 100%;
}

@media screen and (max-width: 1024px) {
    .init-modal-size {
        width: auto !important;
    }

    .init-user {
        display: block;
    }

    .init-video-container {
        padding: 0px;
    }

    .init-modal-size {
        width: 480px !important;
    }
}

.init-user select {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background: var(--select-bg) !important;
    color: white;
    border: var(--border);
    border-radius: 5px;
    box-shadow: none;
    cursor: pointer;
}

.init-user button {
    width: 50px;
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.5rem;
    color: white;
    border: var(--border);
    border-radius: 5px;
    background-color: transparent;
}

.init-user button:hover {
    background: var(--body-bg);
}

.fa-phone-slash,
.fa-microphone-slash,
.fa-video-slash {
    color: red !important;
}

/*--------------------------------------------------------------
# Session Time
--------------------------------------------------------------*/

#myCurrentSessionTime {
    font-size: 14px;
    color: white;
    margin-right: 5px;
}

/*--------------------------------------------------------------
# Recording indicator
--------------------------------------------------------------*/

.recording-indicator {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #e74c3c;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.recording-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fff;
    animation: recDotBlink 1s ease-in-out infinite;
}

@keyframes recDotBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/*--------------------------------------------------------------
# Bottom buttons
--------------------------------------------------------------*/

#bottomButtons {
    z-index: 10;
    display: none;
    position: fixed;
    padding: 10px;
    top: var(--bottom-btns-top);
    left: var(--bottom-btns-left);
    bottom: var(--bottom-btns-bottom);
    transform: translate(var(--bottom-btns-translate-X), var(--bottom-btns-translate-Y));
    flex-direction: var(--bottom-btns-flex-direction);
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: var(--bottom-btns-margin-bottom);
    border-radius: 10px;
    border: none !important;
    box-shadow: var(--box-shadow);
}

/* Button with hover menu (audio/video/secondCam) */
#bottomButtons .btn-with-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

#bottomButtons .btn-with-menu>.dropdown-menu {
    display: none;
    z-index: 9999;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 82px;
    padding: 10px 5px;
    border: var(--border);
    background: var(--body-bg);
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    min-width: 280px;
    max-width: calc(100vw - 24px);
    text-align: left;
}

#bottomButtons .btn-with-menu>.dropdown-menu.show {
    display: block;
}

/* Split button (settings in more container) */
#bottomButtons .split-btn {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    overflow: visible;
    border-radius: 10px;
}

/* Let the dropdown menu anchor to the whole split button. */
#bottomButtons #settingsExtraDropdown {
    position: static;
}

#bottomButtons .split-btn>button {
    border-radius: 0;
    margin: 0;
}

#bottomButtons .split-btn>button:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

#bottomButtons .split-btn .device-dropdown-toggle {
    border-radius: 0;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border-left: var(--border);
    margin: 0;
}

/* Keep the group visually together when hovering. */
#bottomButtons .split-btn button:hover {
    transform: none;
}

#bottomButtons button {
    width: 60px;
    height: 60px;
    padding: 10px;
    font-size: 2rem;
    color: var(--btn-bar-bg-color);
    background: var(--btns-bg-color);
    border: none !important;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

/* Force primary bar buttons to 60px on ALL devices (mobile, tablet, desktop) */
#bottomButtons>button,
#bottomButtons>.btn-with-menu>button,
#bottomButtons>.leave-btn-wrapper>button {
    width: 60px !important;
    height: 60px !important;
    font-size: 2rem !important;
}

/* ---- Bottom bar labels (via data-label) ---- */
#bottomButtons>.btn-with-menu[data-label],
#bottomButtons>.leave-btn-wrapper[data-label] {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 4px 6px !important;
    border-radius: 12px;
}

/* Inner buttons inside labeled wrappers: icon-only, no fixed box */
#bottomButtons>.btn-with-menu[data-label]>button,
#bottomButtons>.leave-btn-wrapper[data-label]>button {
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

#bottomButtons>button[data-label] {
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 10px 6px !important;
    border-radius: 12px;
    background: transparent !important;
}

#bottomButtons>[data-label]::after {
    content: attr(data-label);
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 6px;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Device dropdown toggle (settings extra in more container) */
#bottomButtons .device-dropdown-toggle {
    width: 35px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

#bottomButtons .device-dropdown-toggle i {
    font-size: 0.9rem;
}

#bottomButtons .dropdown-menu button {
    width: auto;
    font-size: 0.8em;
    padding: 8px 16px;
    border-radius: 0;
    background: none;
    transition: background 0.2s;
}

#bottomButtons .dropdown {
    position: relative;
}

#bottomButtons .dropup .dropdown-menu {
    z-index: 9999;
    position: absolute;
    left: 0;
    padding: 10px 5px;
    bottom: 55px;
    border: var(--border);
    background: var(--body-bg);
    box-shadow: var(--box-shadow);
}

#bottomButtons #settingsExtraMenu {
    min-width: 200px;
    max-width: calc(100vw - 24px);
    text-align: left;
}

/* Mobile: keep dropdown menus inside viewport and scrollable */
@media (max-width: 500px) {

    #bottomButtons #settingsExtraMenu {
        min-width: unset;
        max-width: 90vw;
        left: 5vw !important;
        right: 5vw !important;
        position: fixed !important;
        bottom: 92px !important;
        z-index: 9999;
        overflow-y: auto;
        max-height: 60vh;
        border-radius: 12px;
        box-shadow: var(--box-shadow);
    }

    /* btn-with-menu menus on mobile (used on desktop hover only) */
    #bottomButtons .btn-with-menu>.dropdown-menu {
        position: fixed !important;
        left: 5vw !important;
        right: 5vw !important;
        transform: none;
        bottom: 92px !important;
        min-width: unset;
        max-width: 90vw;
        overflow-y: auto;
        max-height: 60vh;
        border-radius: 12px;
    }
}

#bottomButtons #audioMenu button,
#bottomButtons #videoMenu button,
#bottomButtons #secondCamMenu button,
#bottomButtons #settingsExtraMenu button {
    display: flex;
    width: 100%;
    height: 35px;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: none !important;
}

#bottomButtons #settingsExtraMenu button i {
    width: 20px;
    min-width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1em;
    display: inline-block;
}

/* Quick device picker: section headers + divider (Cameras / Microphones / Speakers) */
#bottomButtons #videoMenu .device-menu-header,
#bottomButtons #audioMenu .device-menu-header,
#bottomButtons #secondCamMenu .device-menu-header,
#bottomButtons #settingsExtraMenu .device-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    font-weight: 600;
    user-select: none;
}

#bottomButtons #videoMenu .device-menu-header i,
#bottomButtons #audioMenu .device-menu-header i,
#bottomButtons #secondCamMenu .device-menu-header i,
#bottomButtons #settingsExtraMenu .device-menu-header i {
    width: 18px;
    text-align: center;
}

#bottomButtons #videoMenu .device-menu-divider,
#bottomButtons #audioMenu .device-menu-divider,
#bottomButtons #secondCamMenu .device-menu-divider,
#bottomButtons #settingsExtraMenu .device-menu-divider {
    height: 1px;
    background: var(--btns-bg-color);
    opacity: 0.6;
    margin: 8px 0;
}

/* Action buttons in device menu */
#bottomButtons #audioMenu .device-menu-action-btn,
#bottomButtons #videoMenu .device-menu-action-btn,
#bottomButtons #secondCamMenu .device-menu-action-btn,
#bottomButtons #settingsExtraMenu .device-menu-action-btn {
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    color: #fff;
    font-weight: 500;
    gap: 8px;
    transition: all 0.2s ease;
}

#bottomButtons #audioMenu .device-menu-action-btn:hover,
#bottomButtons #videoMenu .device-menu-action-btn:hover,
#bottomButtons #secondCamMenu .device-menu-action-btn:hover,
#bottomButtons #settingsExtraMenu .device-menu-action-btn:hover {
    background: var(--btns-bg-color) !important;
    border-color: var(--btns-color);
    transform: translateY(-1px) !important;
}

#bottomButtons #audioMenu .device-menu-action-btn i,
#bottomButtons #videoMenu .device-menu-action-btn i,
#bottomButtons #secondCamMenu .device-menu-action-btn i,
#bottomButtons #settingsExtraMenu .device-menu-action-btn i {
    width: 18px;
    text-align: center;
}

#bottomButtons button:hover {
    background: var(--body-bg);
    transform: var(--btns-hover-scale);
}

/* Inside more grid: no individual button hover (cell hover instead) */
#bottomButtons .more-buttons-container button:hover {
    background: transparent !important;
    transform: none !important;
}

#participantsBtn {
    position: relative;
}

/* Participants count badge for participants button */
#participantsCountBadge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    background: #e74c3c;
    color: #fff;
    border-radius: 8px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.4em;
    pointer-events: none;
    z-index: 2;
    display: none;
    box-sizing: border-box;
    transition:
        font-size 0.2s,
        min-width 0.2s,
        height 0.2s;
}

@media (max-width: 600px) {
    #participantsCountBadge {
        font-size: 11px;
        min-width: 16px;
        height: 16px;
        top: 2px;
        right: 2px;
    }

    #myCurrentSessionTime {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    #participantsCountBadge {
        font-size: 11px;
        min-width: 15px;
        height: 15px;
        top: 1px;
        right: 1px;
    }

    #myCurrentSessionTime {
        font-size: 11px;
    }
}

/*--------------------------------------------------------------
# More button & secondary buttons container
--------------------------------------------------------------*/

#moreBtn {
    position: relative;
}

#moreBtn.active {
    background: var(--body-bg);
    color: #00b894;
}

/* ---- More menu: grid layout with labeled icons ---- */
.more-buttons-container {
    position: absolute;
    bottom: 90px;
    right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 12px;
    width: 300px;
    max-width: 92vw;
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    z-index: 11;
    animation: moreSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Every direct child is a uniform grid cell ---- */
.more-buttons-container>* {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 4px 8px !important;
    border-radius: 12px;
    transition: background 0.18s ease;
    min-width: 0;
    position: relative;
    cursor: pointer;
    overflow: visible;
    gap: 0 !important;
    border: none !important;
}

.more-buttons-container>*:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* ---- Icon buttons (direct children) ---- */
.more-buttons-container>button {
    width: auto !important;
    height: auto !important;
    font-size: 1.4rem;
    color: var(--btn-bar-bg-color);
    background: transparent !important;
}

/* ---- Labels via data-label ---- */
.more-buttons-container>[data-label]::after {
    content: attr(data-label);
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 6px;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---- Wrapper children: btn-with-menu (2nd cam) ---- */
.more-buttons-container>.btn-with-menu>button {
    width: auto !important;
    height: auto !important;
    font-size: 1.4rem;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    transform: none !important;
}

/* 2nd Cam button: enforce red/green state in more menu on all devices */
.more-buttons-container #secondCamBtn {
    color: rgb(255, 0, 0) !important;
}

.more-buttons-container #secondCamBtn.second-cam-active {
    color: rgb(0, 255, 0) !important;
}

/* Hide the dropdown-menu in normal flow (it's absolute when .show) */
.more-buttons-container>.btn-with-menu>.dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
}

/* ---- Wrapper children: split-btn (settings) ---- */
.more-buttons-container>.split-btn {
    flex-wrap: nowrap !important;
}

.more-buttons-container>.split-btn>button:first-child {
    width: auto !important;
    height: auto !important;
    font-size: 1.4rem;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
}

/* Hide the chevron dropdown — settings icon alone is the cell */
#bottomButtons .more-buttons-container>.split-btn>.dropdown {
    position: absolute !important;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bottomButtons .more-buttons-container>.split-btn .device-dropdown-toggle {
    width: 16px !important;
    height: 16px !important;
    font-size: 0.5rem;
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    border-radius: 50% !important;
    border-left: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.more-buttons-container>.split-btn:hover .device-dropdown-toggle {
    opacity: 1;
}

#bottomButtons .more-buttons-container>.split-btn .device-dropdown-toggle i {
    font-size: 0.45rem;
}

/* Override split-btn base border-radius inside grid */
#bottomButtons .more-buttons-container>.split-btn>button {
    border-radius: 0 !important;
}

.more-buttons-container button {
    transition: all 0.15s ease;
}

.more-buttons-container.hidden {
    display: none !important;
}

@keyframes moreSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* When bar is vertical (left side), position popup to the right */
.more-buttons-container.more-vertical {
    bottom: auto;
    right: auto;
    left: 75px;
    top: 50%;
    transform: translateY(-50%);
    max-height: 80vh;
    overflow-y: auto;
}

/* ---- More menu: responsive ---- */
@media (max-width: 500px) {
    .more-buttons-container {
        position: fixed !important;
        bottom: 92px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .more-buttons-container>.btn-with-menu>.dropdown-menu {
        position: fixed !important;
        left: 5vw !important;
        right: 5vw !important;
        transform: none;
        bottom: 200px !important;
        min-width: unset;
        max-width: 90vw;
        overflow-y: auto;
        max-height: 45vh;
        border-radius: 12px;
    }

    .more-buttons-container #settingsExtraMenu {
        min-width: unset;
        max-width: 90vw;
        left: 5vw !important;
        right: 5vw !important;
        position: fixed !important;
        bottom: 200px !important;
        z-index: 9999;
        overflow-y: auto;
        max-height: 45vh;
        border-radius: 12px;
        box-shadow: var(--box-shadow);
    }
}

@media (max-width: 400px) {
    .more-buttons-container {
        bottom: 90px;
    }

    .more-buttons-container>.btn-with-menu>.dropdown-menu,
    .more-buttons-container #settingsExtraMenu {
        bottom: 210px !important;
    }
}

@media (max-width: 360px) {
    .more-buttons-container {
        bottom: 82px;
    }

    .more-buttons-container>.btn-with-menu>.dropdown-menu,
    .more-buttons-container #settingsExtraMenu {
        bottom: 205px !important;
    }
}

/*--------------------------------------------------------------
# Leave / End Meeting combined button
--------------------------------------------------------------*/

.leave-btn-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.leave-call-btn {
    color: #e74c3c !important;
}

.leave-menu {
    position: absolute;
    bottom: 86px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    padding: 10px 5px;
    background: var(--body-bg);
    border: var(--border);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    overflow: hidden;
    z-index: 9999;
    animation: leaveMenuSlideUp 0.15s ease-out;
}

.leave-menu.hidden {
    display: none !important;
}

@keyframes leaveMenuSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.leave-menu-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    height: 35px !important;
    padding: 8px 16px !important;
    font-size: 0.8em !important;
    font-weight: 500;
    color: #fff !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    transform: none !important;
}

.leave-menu-item:hover {
    background: var(--btns-bg-color) !important;
    transform: none !important;
}

.leave-menu-item i {
    width: 20px;
    min-width: 20px;
    text-align: center;
    margin-right: 4px;
    font-size: 1.1em;
    display: inline-block;
}

.leave-menu-end {
    color: #fff !important;
}

.leave-menu-leave {
    color: #fff !important;
}

/* Mobile adjustments */
@media (max-width: 500px) {
    .leave-menu {
        position: fixed !important;
        bottom: 92px;
        left: 50%;
        transform: translateX(-50%);
        min-width: 200px;
    }
}

@media (max-width: 400px) {
    .leave-menu {
        bottom: 90px;
        min-width: 190px;
    }
}

@media (max-width: 360px) {
    .leave-menu {
        bottom: 82px;
    }
}

/*--------------------------------------------------------------
# Caption
--------------------------------------------------------------*/

.caption-draggable {
    z-index: 14;
    display: none;
    flex-direction: column;
    position: fixed;
    height: var(--caption-height);
    width: var(--caption-width);
    min-height: var(--caption-height);
    min-width: var(--caption-width);
    background: var(--msger-bg);
    border: none;
    resize: both;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transition:
        width 0.4s ease-in-out,
        height 0.4s ease-in-out;
}

.caption {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    background: var(--msger-bg);
    border-radius: 16px;
}

/* Draggable Header */
.caption-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3));
    color: #fff;
    cursor: move;
    font-weight: 600;
    font-size: 1.05rem;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.caption-header-title button,
.caption-header-options button {
    padding: 8px 12px;
    border: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.caption-header-title button:hover,
.caption-header-options button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Chat Box */
.caption-chat {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: transparent;
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.6;
}

/* Scrollbar Styling */
.caption-chat::-webkit-scrollbar {
    width: 8px;
}

.caption-chat::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.caption-chat::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.caption-chat::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.6);
    background-clip: padding-box;
}

/* Input Area */
.caption-inputarea {
    display: flex;
    align-items: center;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.caption-inputarea select {
    min-width: 50px;
    margin: 0 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.25s ease;
}

.caption-inputarea select:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.caption-inputarea select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Message Bubble */
.left-msg .msg-caption-bubble {
    background: linear-gradient(135deg, var(--left-msg-bg), rgba(0, 0, 0, 0.6));
    border-bottom-left-radius: 4px;
    color: #fff;
    width: var(--msger-bubble-width);
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#captionMaxBtn,
#captionMinBtn {
    display: none;
}

/* Speech Recognition Buttons */
#speechRecognitionStart,
#speechRecognitionStop {
    margin: 0 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.25s ease;
    font-weight: 500;
}

#speechRecognitionStart:hover,
#speechRecognitionStop:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/*--------------------------------------------------------------
# Empty caption illustration 
--------------------------------------------------------------*/

.empty-caption-notice {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1rem;
    opacity: 0.85;
    transition: opacity 0.2s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.empty-caption-img {
    width: 50%;
    max-width: 240px;
    opacity: 0.8;
    margin: 0 auto 0.5rem auto;
}

.empty-caption-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0.5rem 0 0.2rem 0;
}

.empty-caption-desc {
    color: #b0b0b0;
    max-width: 350px;
    margin: 0 auto;
    font-size: 1rem;
}

/*--------------------------------------------------------------
# Chat room aka msger
--------------------------------------------------------------*/

.msger-draggable {
    z-index: 14;
    display: none;
    position: fixed;
    /* end center screen  */
    height: var(--msger-height);
    width: var(--msger-width);
    min-height: 300px;
    min-width: 280px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    background: var(--msger-bg);
    border: none;
    /* text-align: justify; */
    resize: both;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    transition: width 0.5s ease-in-out;
}

.msger {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    background: var(--msger-bg);
    border-radius: 16px;
}

/*--------------------------------------------------------------
# Chat room header
--------------------------------------------------------------*/

.msger-header,
.msger-private-header {
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.3));
    color: #fff;
    cursor: move;
    font-weight: 600;
    font-size: 1.05rem;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.msger-header-title button,
.msger-header-options button {
    padding: 8px 12px;
    border: none;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.msger-header-title button:hover,
.msger-header-options button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

#msgerMaxBtn,
#msgerMinBtn {
    display: none;
}

/*--------------------------------------------------------------
# Chat room output area
--------------------------------------------------------------*/

.msger-chat {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: transparent;
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.6;
}

.msger-chat::-webkit-scrollbar {
    width: 8px;
}

.msger-chat::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.msger-chat::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.msger-chat::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.6);
    background-clip: padding-box;
}

.msg {
    display: flex;
    align-items: flex-end;
    font-size: 0.85rem;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.msg:last-of-type {
    margin: 0;
}

/* left side */

.left-msg .msg-bubble {
    background: linear-gradient(135deg, var(--left-msg-bg), rgba(0, 0, 0, 0.6));
    border-bottom-left-radius: 4px;
    color: #fff;
    width: var(--msger-bubble-width);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.left-msg .private-msg-bubble {
    background: linear-gradient(135deg, var(--private-msg-bg), rgba(0, 0, 0, 0.6));
    border-bottom-left-radius: 4px;
    color: #fff;
    width: var(--msger-bubble-width);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.left-msg .msg-img {
    margin: 0px 10px 5px 0px;
}

/* right side */

.right-msg {
    flex-direction: row-reverse;
}

.right-msg .msg-bubble {
    background: linear-gradient(135deg, var(--right-msg-bg), rgba(0, 0, 0, 0.6));
    border-bottom-right-radius: 4px;
    color: #fff;
    width: var(--msger-bubble-width);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.right-msg .private-msg-bubble {
    background: linear-gradient(135deg, var(--private-msg-bg), rgba(0, 0, 0, 0.6));
    border-bottom-right-radius: 4px;
    color: #fff;
    width: var(--msger-bubble-width);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.right-msg .msg-img {
    margin: 0px 0px 5px 10px;
}

/* common */

.msg-img {
    width: 50px;
    height: 50px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.peer-img {
    width: 48px;
    height: 48px;
    border-radius: 50px !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.private-msg-bubble,
.msg-bubble {
    /* max-width: 200px; */
    padding: 12px 16px;
    border-radius: 18px;
    overflow: auto;
}

.msg-caption-bubble {
    padding: 12px 16px;
    border-radius: 18px;
}

.msg-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.msg-info-name {
    margin-right: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.msg-info-time {
    font-size: 0.75em;
    opacity: 0.8;
}

.msg-text {
    /* https://css-tricks.com/almanac/properties/o/overflow-wrap/ */
    display: inline;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.msg-text button {
    padding: 5px;
}

.msg-text iframe {
    width: 100%;
}

.msger-copy-txt {
    border: none;
    border-radius: 5px;
    color: #fff;
    background: transparent;
}

a {
    color: #fff;
}

a:hover {
    color: var(--hover-color);
    transition: all 0.3s ease-in-out;
}

#chat-msg-a {
    color: #fff;
}

button {
    padding: 10px 20px;
    cursor: pointer;
    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
    outline: none;
}

/* button:hover {
    color: white !important;
    background: var(--body-bg);
} */

/*--------------------------------------------------------------
# Chat room input area
--------------------------------------------------------------*/

.msger-inputarea {
    display: flex;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.msger-input {
    flex: 1;
    padding: 10px;
    height: 15px;
    resize: none;
    color: #fff;
    font-size: 14px !important;
    background: rgba(0, 0, 0, 0.2);
    border-top-left-radius: 10px;
    -webkit-transition: height 1s;
    -moz-transition: height 1s;
    -ms-transition: height 1s;
    -o-transition: height 1s;
    transition: height 1s;
    border: var(--border);
}

.msger-input::-webkit-scrollbar {
    width: 5px;
}

.msger-input::-webkit-scrollbar-track {
    background: transparent;
}

.msger-input::-webkit-scrollbar-thumb {
    background: #404040;
}

/*--------------------------------------------------------------
# Chat room buttons area
--------------------------------------------------------------*/

.msger-input-buttons {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
}

.msger-input-buttons button {
    padding: 5px 6px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    color: #fff;
    background: transparent;
    transition: background 0.23s;
}

.msger-input-buttons button:hover {
    background: var(--body-bg);
}

.msger-input-buttons input {
    cursor: pointer;
}

#msgerSendBtn {
    float: right;
}

/*--------------------------------------------------------------
# Chat participant dropdown and send button unified styles 
--------------------------------------------------------------*/

.msger-peer-inputarea {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    background: transparent;
}

.msger-peer-inputarea>span {
    display: none;
}

.msger-peer-inputarea .peer-img {
    width: 48px;
    height: 48px;
    border-radius: 50px !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.msger-peer-inputwrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.msger-peer-inputwrap .msger-input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.18);
    color: #fff;
    resize: none;
    height: 28px;
    margin-right: 2px;
}

.msger-peer-inputwrap .msger-input:focus {
    outline: none;
    border-color: #66beff;
}

.msger-peer-inputarea .dropdown-menu-custom {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    width: 32px;
    min-width: 28px;
    max-width: 36px;
    margin-left: 2px;
}

.msger-peer-inputarea .dropdown-menu-custom-list {
    z-index: 9999;
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    width: 240px;
    min-width: 200px;
    background: var(--body-bg);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 6px 0;
    margin: 4px 35px 0px 0px;
}

.msger-peer-inputarea .dropdown-menu-custom-list.show {
    display: block;
}

.msger-peer-inputarea .msgPrivate,
.msger-peer-inputarea .dropdown-toggle {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 4px;
}

.msger-peer-inputarea .msgPrivate {
    background: none;
    border: none;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
}

/*--------------------------------------------------------------
# Empty chat illustration and message 
--------------------------------------------------------------*/

.empty-chat-notice {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1rem;
    opacity: 0.85;
    transition: opacity 0.2s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.empty-chat-img {
    width: 50%;
    max-width: 240px;
    opacity: 0.8;
    margin: 0 auto 0.5rem auto;
}

.empty-chat-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0.5rem 0 0.2rem 0;
}

.empty-chat-desc {
    color: #b0b0b0;
    max-width: 350px;
    margin: 0 auto;
    font-size: 1rem;
}

/*--------------------------------------------------------------
# Chat Connected Peers 
--------------------------------------------------------------*/

#msgerCP {
    z-index: 12;
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: default;
    background: var(--msger-private-bg);
    overflow: hidden;
    border-radius: 16px;
}

#msgerCPChat {
    flex: 1;
    overflow-y: auto;
    background: transparent;
    padding: 12px;
}

#msgerCPList {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.25s ease;
}

#msgerCPList:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

#msgerCPList textarea {
    height: auto;
}

#msgerCPList button {
    border: none;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    transition: all 0.25s ease;
    font-weight: 500;
}

#msgerCPList button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(3px);
}

#searchPeerBarName {
    width: calc(100% - 55px);
    padding: 12px 16px;
    margin: 0 12px;
    font-size: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.25s ease;
}

#searchPeerBarName:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(0, 0, 0, 0.4);
}

.msger-peer-inputarea {
    display: flex;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.msger-peer-inputarea * {
    padding: 5px;
    border: none;
    border-radius: 3px;
    font-size: 1rem;
    margin: 1px;
    color: #fff;
}

/*--------------------------------------------------------------
# Knock to join - Waiting section
--------------------------------------------------------------*/

.knock-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 8px 4px;
}

.knock-section-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.knock-section-count {
    font-size: 0.85rem;
    color: #999;
}

.knock-respond-all {
    position: relative;
}

.knock-respond-all-btn {
    background: none;
    border: none;
    color: #5c6bc0;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s;
}

.knock-respond-all-btn:hover {
    color: #3f51b5;
    transform: none;
}

.knock-respond-all-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    z-index: 10;
    min-width: 150px;
}

.knock-respond-all-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: #e0e0e0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.knock-respond-all-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: none;
}

.knock-respond-all-option.accept i {
    color: #66bb6a;
}

.knock-respond-all-option.reject i {
    color: #ef5350;
}

.knock-section-divider {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

.knock-waiting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
}

.knock-waiting-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.knock-waiting-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.knock-waiting-info {
    flex: 1;
    min-width: 0;
}

.knock-waiting-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.knock-waiting-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.knock-btn-accept {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #5c6bc0;
    color: #fff;
}

.knock-btn-accept:hover {
    background: #3f51b5;
    transform: none;
}

.knock-btn-reject {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.knock-btn-reject:hover {
    background: #e53935;
    color: #fff;
    transform: none;
}

/* Viewer list section */

.viewer-list-section {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 12px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.viewer-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 8px 0;
}

.viewer-section-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #5bc0de;
}

.viewer-section-count {
    font-size: 0.8rem;
    color: #999;
    margin-left: 8px;
}

.viewer-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 6px;
    transition: background 0.2s;
}

.viewer-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.viewer-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(91, 192, 222, 0.4);
}

.viewer-list-info {
    flex: 1;
    min-width: 0;
}

.viewer-list-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.viewer-list-time {
    font-size: 0.7rem;
    color: #888;
    margin-top: 1px;
}

.viewer-kick-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ccc;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s, color 0.2s;
}

.viewer-kick-btn:hover {
    background: #e53935;
    color: #fff;
}

/* Knock notification popup (top-right) */

.knock-notification {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    width: 340px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    padding: 16px;
    animation: knockSlideIn 0.3s ease-out;
}

@keyframes knockSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.knock-notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.knock-notification-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #e0e0e0;
    flex-shrink: 0;
    object-fit: cover;
}

.knock-notification-text {
    flex: 1;
    min-width: 0;
}

.knock-notification-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.knock-notification-subtitle {
    font-size: 0.82rem;
    color: #666;
}

.knock-notification-subtitle b {
    color: #333;
    text-decoration: underline;
    cursor: pointer;
}

.knock-notification-actions {
    display: flex;
    gap: 8px;
}

.knock-notification-btn-accept {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: #5c6bc0;
    color: #fff;
    transition: background 0.2s;
}

.knock-notification-btn-accept:hover {
    background: #3f51b5;
}

.knock-notification-btn-respond {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    background: #f5f5f5;
    color: #666;
    transition: all 0.2s;
}

.knock-notification-btn-respond:hover {
    background: #eee;
    border-color: #ccc;
}

.knock-notification-btn-skip {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #999;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.knock-notification-btn-skip:hover {
    background: #e0e0e0;
    color: #333;
}

/*--------------------------------------------------------------
# Empty participants illustration
--------------------------------------------------------------*/

.empty-participants-notice {
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 1rem;
    opacity: 0.85;
    transition: opacity 0.2s;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.empty-participants-img {
    width: 50%;
    max-width: 240px;
    opacity: 0.8;
    margin: 0 auto 0.5rem auto;
}

.empty-participants-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0.5rem 0 0.2rem 0;
}

.empty-participants-desc {
    color: #b0b0b0;
    max-width: 350px;
    margin: 0 auto;
    font-size: 1rem;
}

/*--------------------------------------------------------------
# Chat/room/user emoji picker
--------------------------------------------------------------*/

#usernameEmoji {
    position: absolute;
    z-index: 9999;
    background: var(--body-bg);
    border: var(--border);
    border-radius: 5px;
    --rgb-background: var(--body-bg) !important;
    --color-border-over: var(--body-bg) !important;
    --font-family: 'Montserrat';
}

.chatEmojiPicker {
    z-index: 12;
    position: absolute;
    bottom: 105px;
    left: 10px;
    background: var(--body-bg);
    border: var(--border);
    border-radius: 5px;
    --rgb-background: var(--body-bg) !important;
    --color-border-over: var(--body-bg) !important;
    --font-family: 'Montserrat';
}

/* Emoji Picker (Room) */

.roomEmoji {
    z-index: 18;
    position: absolute;
    display: none;
    background: var(--body-bg);
    border: var(--border);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    --rgb-background: var(--body-bg);
    --color-border-over: var(--body-bg);
    --font-family: 'Montserrat';
}

.room-emoji-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--body-bg);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    padding: 8px 12px 4px 12px;
    cursor: move;
}

.room-emoji-title {
    font-weight: bold;
    font-size: 1.05rem;
    color: #fff;
}

.room-emoji-close-btn {
    display: inline-block;
    position: static;
    margin-left: 8px;
    font-size: 1.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
}

.room-emoji-close-btn:hover {
    background: var(--body-bg);
    border-radius: 50%;
}

.room-emoji-tab-container {
    display: flex;
    justify-content: center;
    margin: 0 0 8px 0;
    gap: 6px;
}

.room-emoji-tab {
    margin-top: 10px;
    background: none;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 3px 14px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.room-emoji-tab.active {
    background: rgba(255, 255, 255, 0.08);
}

.room-emoji-mart {
    display: block;
}

.room-emoji-grid {
    display: none;
    gap: 8px;
    font-size: 2rem;
    max-width: 360px;
    margin: 0 auto;
    justify-items: center;
    align-items: center;
    padding: 16px 16px;
}

.room-emoji-grid.visible {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 56px;
}

.room-emoji-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition:
        background 0.15s,
        transform 0.15s;
    color: #fff;
}

.room-emoji-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.15);
}

.userEmoji {
    z-index: 18;
    position: absolute;
    left: 15px;
    bottom: 60px;
    border-radius: 10px;
}

/*--------------------------------------------------------------
# Data time picker
--------------------------------------------------------------*/

#datetimePicker {
    padding: 10px;
    text-align: center;
    color: white;
    background: var(--body-bg);
    border: var(--border);
    border-radius: 5px;
}

/*--------------------------------------------------------------
# Room QR
--------------------------------------------------------------*/

#qrRoomContainer {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrRoomPopupContainer {
    z-index: 9999;
    position: fixed;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px;
    background: var(--body-bg);
    border: var(--border);
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

#qrText {
    margin-top: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

#qrRoomPopup {
    width: 256px;
    height: 256px;
}

/*--------------------------------------------------------------
# Share Dialog
--------------------------------------------------------------*/

.share-dialog {
    text-align: left;
}

.share-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.share-qr-wrap canvas {
    border-radius: 12px;
    width: 180px !important;
    height: 180px !important;
}

.share-qr-hint {
    color: #888;
    font-size: 0.75rem;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.share-card {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.share-card-main {
    background: rgba(8, 189, 89, 0.1);
    border: 1px solid rgba(8, 189, 89, 0.25);
}

.share-card-viewer {
    background: rgba(91, 192, 222, 0.08);
    border: 1px solid rgba(91, 192, 222, 0.2);
}

.share-card-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.share-card-icon-main {
    background: rgba(8, 189, 89, 0.2);
    color: #08bd59;
}

.share-card-icon-viewer {
    background: rgba(91, 192, 222, 0.2);
    color: #5bc0de;
}

.share-card-body {
    flex: 1;
    min-width: 0;
}

.share-card-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #e0e0e0;
}

.share-card-room {
    font-size: 0.75rem;
    color: #08bd59;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.share-card-desc {
    font-size: 0.7rem;
    color: #999;
    margin-top: 1px;
}

.share-card-url {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
    font-size: 0.68rem;
    color: #aaa;
    word-break: break-all;
    line-height: 1.4;
    user-select: all;
}

.share-card-btn {
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: filter 0.2s;
    flex-shrink: 0;
}

.share-card-btn:hover {
    filter: brightness(1.15);
}

.share-card-btn-copy {
    background: #5546b4;
    color: #fff;
}

.share-card-btn-email {
    background: #08bd59;
    color: #fff;
}

/*--------------------------------------------------------------
# My settings
--------------------------------------------------------------*/

#mySettings {
    z-index: 16;
    position: absolute;
    display: none;
    margin: auto;
    padding: 10px;
    width: 50%;
    min-height: 560px !important;
    background: var(--body-bg);
    box-shadow: var(--box-shadow);
    border: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.mySettingsMain {
    display: flex;
}

@media screen and (max-width: 1030px) {
    #mySettings {
        width: 75%;
    }
}

@media screen and (max-width: 830px) {
    #mySettings {
        width: 80%;
        min-height: auto;
    }

    .mySettingsMain {
        flex-direction: column;
    }
}

@media screen and (max-width: 500px) {
    #mySettings {
        width: 90%;
    }
}

/* Mobile: 6 primary buttons — compact layout */
@media screen and (max-width: 500px) {
    #bottomButtons {
        gap: 5px;
        padding: 6px 8px;
        flex-wrap: nowrap;
        justify-content: center;
    }

    #bottomButtons>button,
    #bottomButtons>.btn-with-menu>button,
    #bottomButtons>.leave-btn-wrapper>button {
        padding: 10px;
        margin: 0;
    }
}

/* Small mobile */
@media screen and (max-width: 400px) {
    #bottomButtons {
        gap: 3px;
        padding: 5px 5px;
    }
}

/* Very small mobile — reduce button size to fit 6 in viewport */
@media screen and (max-width: 360px) {
    #bottomButtons {
        gap: 2px;
        padding: 4px 3px;
    }

    #bottomButtons>button,
    #bottomButtons>.btn-with-menu>button,
    #bottomButtons>.leave-btn-wrapper>button {
        width: 54px !important;
        height: 54px !important;
        font-size: 1.7rem !important;
    }
}

/*--------------------------------------------------------------
# Chat / Participants panel — responsive
--------------------------------------------------------------*/

/* Mobile */
@media screen and (max-width: 500px) {
    :root {
        --msger-width: calc(100vw - 16px);
        --msger-height: calc(100vh - 80px);
    }

    .msger-header,
    .msger-private-header {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    #searchPeerBarName {
        width: calc(100% - 40px);
        padding: 10px 12px;
        margin: 0 8px;
        font-size: 0.9rem;
    }

    .msger-peer-inputarea {
        padding: 8px;
    }
}

/* Very small mobile */
@media screen and (max-width: 360px) {
    :root {
        --msger-width: calc(100vw - 8px);
        --msger-height: calc(100vh - 70px);
    }

    .msger-header,
    .msger-private-header {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

#mySettingsHeader {
    height: 25px;
    cursor: move;
}

#mySettings i,
#mySettings p {
    display: inline-flex;
    margin: auto;
    color: #fff;
    padding: 5px;
    background: transparent;
}

#mySettings select {
    display: block;
    padding: 10px;
    min-width: 150px;
    max-width: 310px;
    margin-top: 10px;
    /* height: 40px; */
    background: var(--select-bg) !important;
    color: #fff;
    border: var(--border);
    border-radius: 5px;
    box-shadow: none;
    cursor: pointer;
}

#mySettingsCloseBtn {
    font-size: 1.2rem;
    color: #fff;
    border: none;
    border-radius: 5px;
    float: right;
    background: transparent;
    transition: background 0.23s;
}

#mySettingsCloseBtn:hover {
    background: var(--body-bg);
}

.form-check-input {
    cursor: pointer;
}

.title {
    display: inline-table;
    width: auto;
    color: white;
    font-size: 0.9rem;
    /* font-weight: bold; */
}

.inline-check-box {
    margin-bottom: 20px;
    display: inline-flex;
    text-align: left;
    color: white;
}

#themeColorPicker {
    z-index: 6;
    padding: 10px;
    margin-top: 10px;
    margin-bottom: 20px;
    width: 130px;
    border: var(--border);
    border-radius: 5px;
    background: var(--select-bg);
    color: white;
    cursor: pointer;
}

#keepCustomTheme {
    margin-bottom: 10px;
}

.buttons {
    padding: 10px;
    float: left;
    text-align: left;
    color: #fff;
    width: auto !important;
    font-size: 0.9rem;
    border: var(--border);
    border-radius: 10px;
    background: var(--selctt-bg);
    outline: none;
    cursor: pointer;
    transition: 0.3s;
}

.buttons:hover {
    background-color: var(--body-bg) !important;
    transform: translateY(-3px) !important;
}

.extra-info-container {
    margin-top: 15px;
    border-radius: 5px;
    background: var(--body-bg);
    overflow-x: none;
    overflow-y: auto;
}

#extraInfo {
    padding: 10px;
    font-size: 14px;
    color: #fff;
    /* background: var(--select-bg); */
    border-radius: 10px;
}

/*--------------------------------------------------------------
# Settings buttons
--------------------------------------------------------------*/

#myPeerNameSet {
    width: 50%;
    padding: 10px;
    border: var(--border);
    border-radius: 5px;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.2);
}

#tabRoomSecurity button {
    width: 100%;
    margin-bottom: 5px;
}

#myProfileAvatar {
    margin-top: 10px;
    width: 64px;
    height: 64px;
    border-radius: 50px;
}

#captionEveryoneStopBtn {
    display: none;
    padding: 10px;
    font-size: 0.9rem;
    border: var(--border);
    border-radius: 5px;
    color: #fff;
    background-color: transparent;
}

#activeRoomsBtn,
#myPeerNameSetBtn,
#captionEveryoneBtn,
#muteEveryoneBtn,
#hideEveryoneBtn,
#ejectEveryoneBtn,
#endMeetingBtn,
#roomSendEmailBtn,
#lockRoomBtn,
#unlockRoomBtn {
    padding: 10px;
    font-size: 0.9rem;
    border: var(--border);
    border-radius: 5px;
    color: #fff;
    background-color: transparent;
}

#myPeerNameSetBtn:hover,
#roomSendEmailBtn:hover,
#lockRoomBtn:hover,
#unlockRoomBtn:hover {
    background: var(--body-bg);
    transform: translateY(-3px);
    transition: all 0.3s ease-in-out;
}

#recImage {
    width: 128px;
    height: auto;
    margin-bottom: 10px;
    margin-top: 5px;
    border-radius: 30px;
    cursor: pointer;
}

#recImage:hover {
    box-shadow: 0px 4px 8px 0px rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

#captionEveryoneStopBtn:hover {
    color: orange;
    transform: translateY(-3px);
    transition: all 0.3s ease-in-out;
}

#muteEveryoneBtn:hover,
#hideEveryoneBtn:hover,
#ejectEveryoneBtn:hover {
    color: red;
    transform: translateY(-3px);
    transition: all 0.3s ease-in-out;
}

#endMeetingBtn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    font-weight: 600;
    border: 2px solid #bd2130;
}

#endMeetingBtn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    transition: all 0.3s ease-in-out;
}

#activeRoomsBtn:hover,
#captionEveryoneBtn:hover {
    color: green;
    transform: translateY(-3px);
    transition: all 0.3s ease-in-out;
}

/*--------------------------------------------------------------
# Settings Table
--------------------------------------------------------------*/

#mySettingsTable {
    width: 100%;
    color: #fff;
    table-layout: auto;
    border-collapse: collapse;
    border-radius: 10px;
    background: var(--body-bg);
}

#mySettingsTable td,
#mySettingsTable th {
    padding: 10px;
    text-align: left;
}

#mySettingsTable td:first-child {
    width: auto;
}

#mySettingsTable td:last-child {
    width: 140px;
    justify-content: center;
    align-items: center;
}

/* Optional alternating row background */
/* #mySettingsTable tr:nth-child(even) {
    background: var(--select-bg);
} */

#mySettingsTable i {
    border: none;
    border-radius: 5px;
}

#mySettingsTable select {
    width: 100px !important;
}

/*--------------------------------------------------------------
# Shortcut Table
--------------------------------------------------------------*/

#shortcutsTable {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    text-align: left;
    color: #fff;
    border-radius: 10px;
    background: var(--body-bg);
}

#shortcutsTable th,
#shortcutsTable td {
    padding: 5px;
    /* border: var(--border); */
}

#shortcutsTable th {
    background: var(--body-bg);
    font-weight: bold;
}

#shortcutsTable td i {
    color: #007bff;
}

#shortcutsTable tr:nth-child(even) {
    background: var(--body-bg);
}

/*--------------------------------------------------------------
# Style the tab
--------------------------------------------------------------*/

.tab {
    padding: 10px;
    overflow: hidden;
    border-radius: 5px;
    width: 35%;
    background-color: var(--body-bg);
    min-height: 480px;
    display: flex;
    flex-direction: column;
    border-right: var(--border);
}

.tabActions {
    position: relative;
    width: 65%;
}

@media screen and (max-width: 830px) {
    .tab {
        display: inline;
        width: 100%;
        min-height: auto;
        flex-direction: row;
        border-right: none !important;
    }

    .tabActions {
        width: 100%;
        border-radius: 10px;
    }

    .tabButtonText {
        display: none !important;
    }
}

/* Style the buttons inside the tab */
.tab button {
    margin: 3px;
    padding: 11px;
    float: left;
    text-align: left;
    color: #fff;
    font-size: 1rem;
    border: var(--border);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.2);
    outline: none;
    cursor: pointer;
    transition: 0.3s;
}

/* Change background color of buttons on hover */
.tab button:hover {
    background: var(--body-bg);
    transform: translateY(-3px);
}

/* Create an active/current tablink class */
.tab button.active {
    background-color: var(--tab-btn-active);
}

/* Style the tab content */
.tabcontent {
    display: none;
    margin-top: 15px;
    padding: 6px 12px;
    width: 100%;
    max-height: 530px;
    min-height: 480px;
    border-top: none;
    background-color: var(--body-bg);
    overflow-x: hidden;
    overflow-y: auto;
}

.tabcontent button {
    margin-top: 10px;
    width: 100%;
    text-align: left;
}

.tabcontent button:hover {
    background: var(--body-bg);
    transform: scale(1);
}

/* on open display devices tab */
#tabRoom {
    display: block;
}

/*--------------------------------------------------------------
# Settings - microphone volume indicator
--------------------------------------------------------------*/

.volume-container {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: var(--body-bg);
    border-radius: 8px;
}

.volume-bar {
    flex: 1;
    height: 5px;
    margin: 0 2px;
    background-color: #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.active {
    background-color: limegreen;
}

/*--------------------------------------------------------------
# Input slider UI
--------------------------------------------------------------*/

.switch {
    position: relative;
    display: inline-block;
    width: 41px;
    height: 19px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: '';
    height: 17px;
    width: 17px;
    left: 0px;
    bottom: 1px;
    background-color: white;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

input:checked+.slider {
    background-color: green;
}

input:focus+.slider {
    box-shadow: 0 0 1px green;
}

input:checked+.slider:before {
    -webkit-transform: translateX(24px);
    -ms-transform: translateX(24px);
    transform: translateX(24px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/*--------------------------------------------------------------
# Swal2
--------------------------------------------------------------*/

.swal2-popup {
    border: var(--border) !important;
    /* box-shadow: var(--box-shadow) !important; */
}

.swal2-popup .swal2-styled:focus {
    box-shadow: none !important;
}

.swal2-validation-message,
.swal2-title,
.swal2-content,
.swal2-input {
    text-align: center;
    color: white !important;
    background-color: transparent !important;
}

.swal2-input {
    border: var(--border) !important;
    box-shadow: none !important;
}

.swal2-file {
    color: white !important;
    background-color: transparent !important;
}

.swal2-html-container {
    color: rgb(195, 195, 195) !important;
    background-color: transparent !important;
}

.swal2-select {
    background-color: var(--select-bg) !important;
    color: white !important;
    border-radius: 6px !important;
}

.swal2-timer-progress-bar-container {
    background: var(--body-bg);
}

.swal2-timer-progress-bar {
    background-color: #1d8ecd !important;
}

.img-about {
    margin: 0 !important;
}

/*--------------------------------------------------------------
# Fade in page on load 
--------------------------------------------------------------*/

.fadein {
    -webkit-animation: fadeIn ease-in 1;
    -moz-animation: fadeIn ease-in 1;
    animation: fadeIn ease-in 1;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    -webkit-animation-duration: 1s;
    -moz-animation-duration: 1s;
    animation-duration: 1s;
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@-moz-keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/*--------------------------------------------------------------
# Pulse class effect
--------------------------------------------------------------*/

.pulsate {
    animation: pulsate 3s ease-out;
    animation-iteration-count: infinite;
    -webkit-animation: pulsate 3s ease-out;
    -webkit-animation-iteration-count: infinite;
    opacity: 0.5;
}

@-webkit-keyframes pulsate {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes pulsate {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

@-webkit-keyframes pulsate {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/*--------------------------------------------------------------
# Send File
--------------------------------------------------------------*/

#sendFileDiv,
#receiveFileDiv {
    z-index: 17;
    display: none;
    min-width: 320px;
    border-radius: 5px;
    margin: auto;
    padding: 10px;
    color: #fff;
    font-size: 1rem;
    background: var(--body-bg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

#sendAbortBtn,
#receiveAbortBtn,
#receiveHideBtn {
    margin-top: 10px;
    padding: 5px;
    border: var(--border);
    border-radius: 5px;
    font-size: 1rem;
    color: #fff;
    background-color: transparent;
    transition: background 0.23s;
}

#sendAbortBtn:hover,
#receiveAbortBtn:hover,
#receiveHideBtn:hover {
    color: rgb(255, 0, 0);
    background: var(--body-bg);
    transform: translateY(-3px);
}

progress {
    width: 0;
    min-width: 100%;
}

#imgShareSend:hover,
#imgShareReceive:hover {
    cursor: move;
}

#dropArea {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
}

#dropArea p {
    margin: 0;
}

/*--------------------------------------------------------------
# Video Audio IFrame
--------------------------------------------------------------*/

#videoAudioUrlCont,
#videoUrlCont {
    z-index: 15;
    display: none;
    width: var(--iframe-width);
    height: var(--iframe-height);
    border: var(--border);
    box-shadow: var(--box-shadow);
    border-radius: 5px;
}

#videoAudioUrlHeader,
#videoUrlHeader {
    z-index: 15;
    position: absolute;
    display: flex;
    left: 0px;
    top: 0px;
    width: 100%;
    cursor: move;
    border-radius: 5px;
}

#videoAudioUrlHeader button,
#videoUrlHeader button {
    height: 30px;
    width: 30px;
    font-size: 1.2rem;
    margin-top: 10px;
    margin-left: 10px;
    border: none;
    color: #fff;
    background: black;
}

#videoAudioUrlHeader button:hover,
#videoUrlHeader button:hover {
    color: var(--hover-color);
    transform: var(--btns-hover-scale);
    transition: all 0.3s ease-in-out;
}

#videoUrlIframe {
    width: var(--iframe-width);
    height: var(--iframe-height);
    border-radius: 5px;
}

#videoAudioUrlElement {
    width: var(--iframe-width);
    height: var(--iframe-height) - 20px;
    border-radius: 5px;
}

/*--------------------------------------------------------------
# About
--------------------------------------------------------------*/

#about {
    cursor: default;
    /*text-decoration: none;*/
}

#about a {
    color: #fff;
    text-decoration: none;
}

#about a:hover {
    color: var(--hover-color);
    transition: all 0.3s ease-in-out;
}

#about img {
    cursor: pointer;
    border-radius: 10px;
}

#about button {
    border: none;
    width: 170px;
    height: 40px;
    font-size: 1.2rem;
    border-radius: 6px;
    color: #ffffff;
    background: linear-gradient(65deg, #376df9 0, #ff5fa0 100%);
    transition: background 0.23s;
    cursor: pointer;
}

#about button:hover {
    font-weight: bold;
    filter: brightness(1.1) saturate(1.2);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 0, 166, 0.4);
}

/*--------------------------------------------------------------
# Speech bar
--------------------------------------------------------------*/

.speechbar {
    z-index: 9;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 2px;
    width: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.bar {
    width: 6px;
    border-radius: 6px;
    background: rgba(#19bb5c, 0.65);
    transition-property: height background-color;
    transition-duration: 0.25s;
    /*box-shadow: var(--box-shadow);*/
}

.speaking {
    box-shadow: 0 0 1px 1px rgb(255 255 255 / 32%);
    /* lightblue */
}

/*--------------------------------------------------------------
# speech recognition languages
--------------------------------------------------------------*/

#recognitionDialect,
#recognitionLanguage {
    background: var(--select-bg);
    color: #ffffff;
    font-size: small;
    max-width: 135px;
    border-radius: 5px;
}

/*--------------------------------------------------------------
# Other
--------------------------------------------------------------*/

#webRTCSeo {
    /* just for SEO */
    display: none;
}

#videoAudioCloseBtn,
#videoUrlCloseBtn {
    border: none;
    border-radius: 10px;
}

/*--------------------------------------------------------------
# Common
--------------------------------------------------------------*/

select {
    height: 40px;
    font-size: 0.9rem;
    line-height: 40px;
    box-shadow: none;
}

hr {
    border: 0;
    display: block;
    height: 1px;
    background: #dbdbdb;
    margin-top: 15px;
    margin-bottom: 15px;
}

.hidden {
    display: none;
}

.show {
    display: block;
}

.top-center {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
}

.center-img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 50%;
}

.fadein {
    -webkit-animation: fadeIn ease-in 1;
    -moz-animation: fadeIn ease-in 1;
    animation: fadeIn ease-in 1;
    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
    -webkit-animation-duration: 1s;
    -moz-animation-duration: 1s;
    animation-duration: 1s;
}

.clw {
    color: #ffffff;
}

.mic-input-range {
    width: 85px;
    cursor: pointer;
}

/*--------------------------------------------------------------
# Toggle button 
# https://danklammer.com/articles/simple-css-toggle-switch/
--------------------------------------------------------------*/

.toggle {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 55px;
    height: 24px;
    display: inline-block;
    position: relative;
    border-radius: 50px;
    overflow: hidden;
    outline: none;
    border: var(--border);
    cursor: pointer;
    background-color: #000000;
    transition: background-color ease 0.3s;
}

.toggle:before {
    content: 'on off';
    display: block;
    position: absolute;
    z-index: 2;
    width: 20px;
    height: 18px;
    background: #fff;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    font: 10px/20px Helvetica;
    text-transform: uppercase;
    font-weight: bold;
    text-indent: -25px;
    word-spacing: 35px;
    color: #fff;
    text-shadow: -1px -1px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: all cubic-bezier(0.3, 1.5, 0.7, 1) 0.3s;
}

.toggle:checked {
    background-color: green;
}

.toggle:checked:before {
    left: 32px;
}

/*--------------------------------------------------------------
# DropDown menu
--------------------------------------------------------------*/

/* Styles for the dropdown button */
.dropdown-toggle {
    /* padding: 10px 20px; */
    color: #fff;
    border: none;
    border-radius: 5px;
    background-color: var(--body-bg);
    cursor: pointer;
}

/* Styles for the dropdown menu container */
.dropdown-menu {
    display: none;
    margin-top: 5px;
    margin-bottom: 20px;
    border: none;
    border-radius: 10px;
    background-color: var(--body-bg);
}

/*--------------------------------------------------------------
# Dropdown menu custom
--------------------------------------------------------------*/

/* .fas.fa-bars {
    color: #66beff !important;
} */

/* General container for the dropdown */
.dropdown-custom {
    position: relative;
    display: inline-block;
}

/* Style the button that triggers the dropdown */
.dropdown-toggle-custom {
    color: #fff;
    border: var(--border);
    background: var(--body-bg);
    cursor: pointer;
}

/* Dropdown menu */
.dropdown-menu-custom {
    display: none;
    position: fixed;
    right: 0;
    padding: 10px 0;
    min-width: 240px;
    border-radius: 5px;
    border: none;
    background: var(--body-bg);
    z-index: 9999;
}

.dropdown-menu-custom.show {
    display: block;
}

/* Style for dropdown items */
.dropdown-menu-custom li {
    padding: 8px 16px;
    list-style-type: none;
}

.dropdown-menu-custom li button {
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    font-size: 0.8em;
    cursor: pointer;
    color: #fff;
}

.dropdown-menu-custom li button:hover {
    background: var(--select-bg) !important;
}

/* Styles for table cell with title (td) */
.microphone-table-width {
    width: 50%;
}

/* Styles for the Apply Options button */
#applyAudioOptionsBtn {
    width: 100%;
    padding: 10px 20px;
    margin: 5px;
    color: #fff;
    border: var(--border);
    border-radius: 5px;
    background: var(--body-bg);
    cursor: pointer;
}

#applyAudioOptionsBtn:hover {
    background: var(--select-bg);
    transform: scale(0.95);
    transition: all 0.3s ease-in-out;
}

/*--------------------------------------------------------------
# Split Ratio Slider
--------------------------------------------------------------*/

.split-ratio-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #00b894 0%, #00b894 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 100%);
    outline: none;
    cursor: pointer;
    margin: 5px 0;
}

.split-ratio-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00b894;
    cursor: grab;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}

.split-ratio-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.split-ratio-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.split-ratio-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00b894;
    cursor: grab;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
}

.split-ratio-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
}

.split-ratio-slider::-moz-range-thumb:active {
    cursor: grabbing;
}

.split-ratio-slider::-moz-range-track {
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
}

#splitRatioContainer {
    display: block;
}

#splitRatioValue {
    color: #00b894;
    font-weight: bold;
}

.split-ratio-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.split-ratio-slider:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
    background: #666;
}

.split-ratio-slider:disabled::-moz-range-thumb {
    cursor: not-allowed;
    background: #666;
}

/*--------------------------------------------------------------
# Webkit-Scrollbar Styles
--------------------------------------------------------------*/

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--body-bg);
    border-radius: 5px;
    cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--body-bg);
}

::-webkit-scrollbar-track {
    background: #1a1b1f;
}

/*--------------------------------------------------------------
# Common
--------------------------------------------------------------*/

/* strong {
    color: #007bff;
} */

.w-80 {
    width: 80% !important;
}

.ml-10 {
    margin: 10px;
}

.cp {
    cursor: pointer;
}

.trow {
    display: table-row;
}

#initVideo {
    object-fit: contain;
}

#audioMediaContainer,
#pauseRecBtn,
#resumeRecBtn {
    display: none;
}

/*--------------------------------------------------------------
# Colors
--------------------------------------------------------------*/

.red {
    color: #ff4500 !important;
}

.orange {
    color: orange !important;
}

.green {
    color: rgb(0, 255, 71) !important;
}

.b-yellow {
    color: #d4a017 !important;
}

/*--------------------------------------------------------------
# Viewer/Spectator Mode UI
--------------------------------------------------------------*/

/* Banner */
.viewer-banner {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #e0e0e0;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85em;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    cursor: default;
}

.viewer-banner-subtle {
    opacity: 0.4;
    transform: translateX(-50%) scale(0.9);
}

.viewer-banner-subtle:hover {
    opacity: 0.9;
    transform: translateX(-50%) scale(1);
}

.viewer-banner-ended {
    opacity: 1;
    background: rgba(180, 30, 30, 0.85);
    color: #fff;
}

/* LIVE pulse dot */
.viewer-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e53935;
    animation: viewerPulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes viewerPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.6);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 6px rgba(229, 57, 53, 0);
    }
}

.viewer-live-badge {
    font-size: 0.7em;
    font-weight: 700;
    color: #e53935;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.viewer-banner-text {
    color: #aaa;
    font-size: 0.85em;
}

/* Audio enable overlay */
.viewer-audio-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: fadeIn 0.4s ease;
}

.viewer-audio-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    animation: viewerBounce 2s ease-in-out infinite;
}

@keyframes viewerBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.viewer-audio-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}

/* Loading state */
.viewer-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9997;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--body-bg);
}

.viewer-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: viewerSpin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes viewerSpin {
    to {
        transform: rotate(360deg);
    }
}

.viewer-loading-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Viewer bottom controls container */
.viewer-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Shared style for viewer control buttons */
.viewer-volume-btn,
.viewer-chat-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-volume-btn:hover,
.viewer-chat-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Read-only label in viewer chat */
.viewer-chat-readonly {
    text-align: center;
    padding: 10px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
}

/* Tile bottom gradient */
.viewer-tile-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    border-radius: 0 0 10px 10px;
    pointer-events: none;
    z-index: 7;
}

/* Viewer mobile adjustments */
@media (max-width: 480px) {
    .viewer-banner {
        font-size: 0.75em;
        padding: 5px 14px;
    }

    .viewer-audio-icon {
        font-size: 2.5rem;
    }

    .viewer-audio-text {
        font-size: 0.9rem;
    }
}

/*
z-index
6 theme custom picker
7 video avatar img
8 video nav bar 
8 peer name
9 speech bar
10 left buttons
11 whiteboard
12 chat emoji
13 chat peers private msg
14 chat room
14 caption
15 video iframe
16 settings
17 send File Div
18 room Emoji reaction
*/