@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: #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: #000000;
    --msger-bg: rgba(12, 12, 16, 0.85);
    --msger-private-bg: rgba(12, 12, 16, 0.85);
    --wb-bg: #000000;
    --select-bg: rgba(255, 255, 255, 0.05);
    --box-shadow: 0px 16px 40px 0px rgba(0, 0, 0, 0.8);

    /* 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;
}

/* Scoped Hides for Omegle-style Direct Mode */
body.direct-mode .navbar, 
body.direct-mode .videoPeerName, 
body.direct-mode .msger-draggable, 
body.direct-mode .caption-draggable, 
body.direct-mode #loadingDiv h1, 
body.direct-mode #loadingDiv pre, 
body.direct-mode #myCurrentSessionTime, 
body.direct-mode #bottomButtons, 
body.direct-mode .tippy-box,
body.pure-mode .navbar,
body.pure-mode #bottomButtons,
body.pure-mode #myVideoAvatarImage,
body.pure-mode .videoPeerName,
body.pure-mode #loadingDiv,
body.pure-mode #qrRoomPopupContainer,
body.pure-mode .videoAvatarImage,
body.pure-mode .loading-img {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.room-title {
    z-index: 1001;
    position: fixed;
    top: 14px;
    left: 20px;
    pointer-events: auto;
    user-select: none;
    display: flex;
    align-items: center;
    padding: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.room-title img {
    height: 70px !important;
    max-height: 85px !important;
    width: auto !important;
    object-fit: contain;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.95));
}

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

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

html,
body {
    top: 0 !important;
    width: 100%;
    height: 100%;
    margin: auto;
    overflow: hidden;
    background: url('../images/bg.png') no-repeat center center fixed;
    background-size: cover;
}

/*--------------------------------------------------------------
# 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-microphone-slash,
.fa-video-slash {
    color: red !important;
}

.fa-phone-slash {
    color: white !important;
}

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

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

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

#bottomButtons {
    z-index: 1000 !important;
    display: flex !important;
    position: fixed;
    padding: 10px 20px;
    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: 12px;
    margin-bottom: var(--bottom-btns-margin-bottom);
    border-radius: 24px;
    background: rgba(12, 12, 18, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85) !important;
    transition: left 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

/* Split button (main action + device arrow) */
#bottomButtons .split-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    overflow: visible;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
}

/* Let the dropdown menu anchor to the whole split button (not only the arrow). */
#bottomButtons #audioDropdown,
#bottomButtons #videoDropdown,
#bottomButtons #settingsExtraDropdown {
    position: static;
}

#bottomButtons .split-btn>button {
    border-radius: 0;
    margin: 0;
    height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    padding: 0 !important;
}

#bottomButtons .split-btn>button:first-child {
    border-top-left-radius: 50px !important;
    border-bottom-left-radius: 50px !important;
    width: 48px !important;
}

#bottomButtons .split-btn .device-dropdown-toggle {
    border-radius: 0;
    border-top-right-radius: 50px !important;
    border-bottom-right-radius: 50px !important;
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin: 0;
    width: 32px !important;
    height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

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

#bottomButtons button {
    width: 48px;
    height: 48px;
    padding: 0 !important;
    font-size: 1.25rem;
    line-height: 1 !important;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent !important;
    border-radius: 50px;
    transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#bottomButtons button i,
#bottomButtons button::before {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    margin: 0 !important;
}

#bottomButtons #leaveRoomBtn {
    background: #ef4444;
    color: white;
    border-radius: 50px;
    width: 72px;
    height: 48px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Quick device picker (Start Audio/Video) */
#bottomButtons .device-dropdown-toggle {
    width: 32px;
    height: 48px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

#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: 45px;
    border: var(--border);
    background: var(--body-bg);
    box-shadow: var(--box-shadow);
}

#bottomButtons #audioMenu,
#bottomButtons #videoMenu,
#bottomButtons #settingsExtraMenu {
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
}

/* Custom scrollbar for device selector popup menus */
#bottomButtons #audioMenu::-webkit-scrollbar,
#bottomButtons #videoMenu::-webkit-scrollbar,
#bottomButtons #settingsExtraMenu::-webkit-scrollbar {
    width: 6px;
}

#bottomButtons #audioMenu::-webkit-scrollbar-thumb,
#bottomButtons #videoMenu::-webkit-scrollbar-thumb,
#bottomButtons #settingsExtraMenu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px;
}

#bottomButtons #audioMenu::-webkit-scrollbar-thumb:hover,
#bottomButtons #videoMenu::-webkit-scrollbar-thumb:hover,
#bottomButtons #settingsExtraMenu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}

#bottomButtons #audioMenu,
#bottomButtons #videoMenu {
    min-width: 280px;
    max-width: calc(100vw - 24px);
    text-align: left;
}

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

/* Mobile: keep settingsExtraMenu inside viewport and scrollable */
@media (max-width: 600px) {

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

#bottomButtons #audioMenu button,
#bottomButtons #videoMenu 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 #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 #settingsExtraMenu .device-menu-header i {
    width: 18px;
    text-align: center;
}

#bottomButtons #videoMenu .device-menu-divider,
#bottomButtons #audioMenu .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 #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 #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 #settingsExtraMenu .device-menu-action-btn i {
    width: 18px;
    text-align: center;
}

#bottomButtons button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    color: #ffffff;
}

#bottomButtons #leaveRoomBtn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

#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: 12px;
        min-width: 15px;
        height: 15px;
        top: 1px;
        right: 1px;
    }

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

@media (max-width: 400px) {
    #participantsCountBadge {
        font-size: 13px;
        min-width: 14px;
        height: 14px;
        top: 0px;
        right: 0px;
    }

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

/*--------------------------------------------------------------
# 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
--------------------------------------------------------------*/

#msgerDraggable,
.msger-draggable,
#msgerCP,
#msgerCPSec {
    z-index: 10005 !important;
    position: fixed !important;
    top: 60px !important;
    right: 20px !important;
    left: auto !important;
    bottom: 90px !important;
    width: 360px !important;
    min-width: 360px !important;
    max-width: 360px !important;
    height: calc(100vh - 160px) !important;
    max-height: calc(100vh - 160px) !important;
    transform: none !important;
    -webkit-transform: none !important;
    margin: 0 !important;
    background: var(--msger-bg);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    resize: none !important;
    overflow: hidden;
    border-radius: 20px !important;
    box-shadow: -10px 15px 40px rgba(0, 0, 0, 0.95), 0 0 1px rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(35px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(200%) !important;
}

.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
--------------------------------------------------------------*/

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

.msger-footer {
    display: flex;
    flex-direction: column;
    padding: 12px 14px 14px 14px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 10px;
}

.msger-inputarea {
    display: flex;
    padding: 0;
    background: transparent;
    width: 100%;
}

.msger-input {
    flex: 1;
    padding: 10px 14px;
    min-height: 42px;
    max-height: 120px;
    resize: none;
    color: #ffffff;
    font-size: 0.92rem !important;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.msger-input:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.msger-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.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 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 0 0 0;
    background: transparent;
    width: 100%;
}

.msger-input-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.msger-input-tools::-webkit-scrollbar {
    display: none;
}

.msger-input-buttons button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.msger-input-buttons button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.msger-input-buttons button:active {
    transform: translateY(0);
}

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

#msgerSendBtn {
    width: 36px;
    height: 32px;
    min-width: 36px;
    padding: 0;
    border: none;
    border-radius: 9px;
    font-size: 0.9rem;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    margin-left: auto;
    float: none;
}

#msgerSendBtn:hover {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px) scale(1.04);
}

#msgerSendBtn:active {
    transform: translateY(0) scale(0.98);
}

/*--------------------------------------------------------------
# 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;
}

/*--------------------------------------------------------------
# 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;
}

/*--------------------------------------------------------------
# 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%;
    }

    #bottomButtons {
        gap: 0.3rem;
        padding: 6px 10px;
        border-radius: 25px;
    }

    #bottomButtons button {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
        padding: 0;
        margin: 0 1px;
    }

    #bottomButtons #leaveRoomBtn {
        width: 56px;
        height: 40px;
        border-radius: 50px;
    }

    #bottomButtons .device-dropdown-toggle {
        width: 24px;
        height: 40px;
    }

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

@media screen and (max-width: 380px) {
    #bottomButtons {
        gap: 0.15rem;
        padding: 2px;
    }

    #bottomButtons button {
        width: 28px;
        font-size: 0.65rem;
        padding: 6px;
        margin: 0 1px;
    }

    #bottomButtons .device-dropdown-toggle {
        width: 14px;
        height: 24px;
    }

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

#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,
#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;
}

#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;
}

/*--------------------------------------------------------------
# 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;
}

/*
/*
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
*/

/*--------------------------------------------------------------
# Mobile UI/UX Optimizations
--------------------------------------------------------------*/
@media (max-width: 768px) {
    /* Room Title Center Alignment on Mobile */
    .room-title {
        top: 12px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10000 !important;
    }

    .room-title h2 {
        font-size: 1.5rem !important;
        letter-spacing: -0.5px !important;
    }

    /* Bottom Buttons - Horizontal Scroll & Centered */
    #bottomButtons {
        bottom: env(safe-area-inset-bottom, 20px) !important;
        background: rgba(15, 23, 42, 0.85) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 30px;
        padding: 6px 12px;
        gap: 6px;
        width: auto;
        max-width: 94vw;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        left: 0 !important;
        right: 0 !important;
        margin: 0 auto !important;
        transform: none !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
        scrollbar-width: none;
        -ms-overflow-style: none;
        mask-image: linear-gradient(to right, black 80%, transparent 100%);
        -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    #bottomButtons::-webkit-scrollbar {
        display: none;
    }

    #bottomButtons button {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 1.05rem;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 50% !important;
        border: 1px solid rgba(255, 255, 255, 0.05) !important;
    }

    #bottomButtons .split-btn {
        gap: 3px;
        margin-right: 2px;
    }

    #bottomButtons .split-btn button {
        border-radius: 50% !important;
    }

    #bottomButtons .device-dropdown-toggle {
        width: 20px;
        min-width: 20px;
        height: 38px;
        background: rgba(255, 255, 255, 0.15);
        font-size: 0.7rem;
    }

    #leaveRoomBtn {
        background: #ef4444 !important;
        width: 52px !important;
        min-width: 52px !important;
        height: 38px !important;
        border-radius: 18px !important;
        margin-left: 6px;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
    }

    /* Chat and Captions - Full Screen Sheet on Mobile */
    .msger-draggable,
    .caption-draggable,
    #aiDraggable {
        top: 10% !important;
        left: 0 !important;
        width: 100% !important;
        height: 90% !important;
        min-width: 100% !important;
        min-height: 90% !important;
        max-width: 100% !important;
        max-height: 90% !important;
        border-radius: 30px 30px 0 0 !important;
        transform: none !important;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.5) !important;
    }

    .msger-header, 
    .caption-header {
        padding: 20px !important;
        border-radius: 30px 30px 0 0 !important;
    }

    .msger-inputarea {
        padding: 15px !important;
        margin-bottom: constant(safe-area-inset-bottom) !important;
        margin-bottom: env(safe-area-inset-bottom) !important;
    }

    .msger-input {
        font-size: 16px !important; /* Prevent iOS zoom on focus */
    }

    #msgerMaxBtn, #msgerMinBtn, #captionMaxBtn, #captionMinBtn, #msgerTogglePin, #captionTogglePin {
        display: none !important;
    }

    /* Dropdown Menus */
    #bottomButtons .dropup .dropdown-menu {
        bottom: 80px;
        width: 90vw !important;
        max-width: 340px !important;
        left: 5vw !important;
        position: fixed !important;
        border-radius: 24px;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.15);
        padding: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    /* Hide non-essential tools on mobile to reduce clutter */
    #screenShareBtn, #snapshotRoomBtn, #documentPiPBtn {
        display: none !important;
    }
}

/* Extra small devices refinement */
@media (max-width: 400px) {
    #bottomButtons {
        gap: 4px;
        padding: 4px 8px;
    }
    
    #bottomButtons button {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.95rem;
    }

    #bottomButtons .device-dropdown-toggle {
        height: 34px;
        width: 18px;
        min-width: 18px;
    }

    #leaveRoomBtn {
        width: 46px !important;
        min-width: 46px !important;
        height: 34px !important;
    }
}

    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #ffffff !important;
    transition: all 0.2s ease-in-out !important;
}

#bottomButtons button:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2) !important;
}

#bottomButtons #leaveRoomBtn {
    background: linear-gradient(135deg, #ff416c, #ff4b2b) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.4) !important;
}

#bottomButtons #leaveRoomBtn:hover {
    transform: translateY(-2px) scale(1.05).swal2-confirm {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    letter-spacing: 0.5px !important;
    padding: 14px 36px !important;
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-top: 15px !important;
}

.swal2-confirm:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.7) !important;
}

/* --- PURE BLACK THEME OVERRIDES --- */
:root {
    --liquid-bg: #000000;
    --glass-panel-bg: rgba(12, 12, 16, 0.92);
    --glass-panel-bg-hover: rgba(24, 24, 32, 0.95);
    --glass-border: rgba(255, 255, 255, 0.14);
    --glass-border-glow: rgba(255, 255, 255, 0.25);
    --glass-specular: inset 0 1px 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 2px 0 rgba(0, 0, 0, 0.5);
    --glass-shadow: 0 25px 60px rgba(0, 0, 0, 0.95);
}

body, html, #videoMediaContainer, .video-box, #videoGrid {
    background-color: #000000 !important;
    background: #000000 !important;
    color: #ffffff !important;
    overflow-x: hidden;
}

body::before, body::after {
    display: none !important;
}

/* --- Floating Black Glass Bottom Dock --- */
#bottomButtons {
    position: fixed !important;
    bottom: env(safe-area-inset-bottom, 24px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(10, 10, 14, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 40px !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    box-shadow: var(--glass-specular), 0 20px 50px rgba(0, 0, 0, 0.95) !important;
    padding: 10px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    z-index: 1000 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#bottomButtons button, #bottomButtons .split-btn {
    border-radius: 20px !important;
}

#bottomButtons button {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#bottomButtons button:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(56, 189, 248, 0.35)) !important;
    border-color: rgba(147, 197, 253, 0.6) !important;
    transform: translateY(-3px) scale(1.08) !important;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

/* Happy AI Button - Liquid Violet Glow */
#happyAiBtn {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(6, 182, 212, 0.8)) !important;
    border: 1px solid rgba(196, 181, 253, 0.5) !important;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

#happyAiBtn:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(14, 165, 233, 0.95)) !important;
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.7), inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-3px) scale(1.1) !important;
}

/* Leave Room Button - Liquid Coral/Crimson */
#leaveRoomBtn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.85), rgba(225, 29, 72, 0.95)) !important;
    border: 1px solid rgba(254, 202, 202, 0.4) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

#leaveRoomBtn:hover {
    background: linear-gradient(135deg, rgba(248, 113, 113, 1), rgba(239, 68, 68, 1)) !important;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.75), inset 0 1px 2px rgba(255, 255, 255, 0.6) !important;
    transform: translateY(-3px) scale(1.1) !important;
}

/* Glass Floating Dropdown Menus */
.dropup .dropdown-menu,
#settingsExtraMenu,
#audioMenu,
#videoMenu,
.dropdown-menu-custom {
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(30px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 20px !important;
    box-shadow: var(--glass-specular), 0 20px 40px rgba(0, 0, 0, 0.8) !important;
    padding: 10px !important;
}

.dropdown-menu-custom li button,
#settingsExtraMenu button {
    border-radius: 12px !important;
    color: #f1f5f9 !important;
    transition: all 0.2s ease !important;
}

.dropdown-menu-custom li button:hover,
#settingsExtraMenu button:hover {
    background: rgba(99, 102, 241, 0.25) !important;
    color: #ffffff !important;
    transform: translateX(3px) !important;
}

/* --- Modals & Sidebars (Chat, Settings, AI, Participants, Captions) --- */
.msger-draggable,
#mySettings,
#msgerCPSec,
#aiDraggable,
#captionDraggable,
.msger,
.swal2-popup {
    background: var(--glass-panel-bg) !important;
    backdrop-filter: blur(32px) saturate(210%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(210%) !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-specular), var(--glass-shadow) !important;
    border-radius: 24px !important;
}

.msger-header,
.msger-private-header,
#mySettingsHeader,
#aiHeader,
#captionHeader {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top-left-radius: 24px !important;
    border-top-right-radius: 24px !important;
}

/* Settings Navigation Tabs */
.tab {
    background: rgba(255, 255, 255, 0.03) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 24px 0 0 24px !important;
}

.tab button {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    color: #e2e8f0 !important;
    border-radius: 12px !important;
    transition: all 0.25s ease !important;
}

.tab button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px) !important;
}

.tab button.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.7), rgba(168, 85, 247, 0.6)) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
}

/* Inputs, Selects & Textareas */
.search-container input,
#searchPeerBarName,
#mySettings select,
.msger-input,
#myPeerNameSet,
#videoSource,
#videoQuality,
#videoObjFitSelect,
#videoFps,
#screenFps,
#audioSource,
#audioOutput {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    backdrop-filter: blur(12px) !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.search-container input:focus,
#searchPeerBarName:focus,
.msger-input:focus,
#mySettings select:focus {
    border-color: rgba(99, 102, 241, 0.8) !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4) !important;
    outline: none !important;
}

/* Custom Liquid Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

/* Top Title Header in Top Left Corner - Clean Aligned Logo */
#roomTitle, .room-title, #appHeader, .app-header {
    position: fixed !important;
    top: 10px !important;
    left: 16px !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
}

#roomTitle:hover, .room-title:hover {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

#roomTitle .top-title-logo, .room-title img, #appHeader img {
    height: 38px !important;
    max-height: 42px !important;
    width: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.95)) !important;
}

@media (max-width: 768px) {
    #roomTitle, .room-title {
        top: 6px !important;
        left: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #roomTitle .top-title-logo, .room-title img {
        height: 26px !important;
        max-height: 30px !important;
    }
}

/* Hide white sidebar buttons, participant count boxes & watermark */
#mobileSidebarToggleBtn, #mobileParticipantsBtn, #mobileHeader, .bottom-right-brand {
    display: none !important;
}

/* ==========================================
   📱 MOBILE & DESKTOP UI/UX FIT ENHANCEMENTS
   ========================================== */
#videoMediaContainer {
    position: fixed !important;
    top: 10px !important;
    bottom: 74px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 84px) !important;
    padding: 4px 4px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@media (max-width: 768px) {
    #videoMediaContainer {
        top: 48px !important;
        bottom: 72px !important;
        width: 100vw !important;
        height: calc(100dvh - 120px) !important;
        padding: 2px 2px !important;
    }
}

/* Mobile & Desktop Bottom Control Dock - Tight Fit Pill, Zero Extra Space */
#bottomButtons {
    position: fixed !important;
    bottom: max(14px, env(safe-area-inset-bottom, 14px)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: auto !important;
    margin: 0 !important;
    width: fit-content !important;
    width: -moz-fit-content !important;
    width: -webkit-fit-content !important;
    max-width: calc(100vw - 20px) !important;
    padding: 6px 12px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    border-radius: 40px !important;
    background: rgba(10, 10, 14, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(35px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(200%) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.95), inset 0 1px 1px rgba(255, 255, 255, 0.25) !important;
    z-index: 10000 !important;
    box-sizing: border-box !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

#bottomButtons::-webkit-scrollbar {
    display: none !important;
}

/* Ensure Dropdown Menus inside bottomButtons are Position Absolute so they don't stretch the dock width */
#bottomButtons .dropdown-menu,
#bottomButtons #audioMenu,
#bottomButtons #videoMenu,
#bottomButtons #settingsExtraMenu {
    position: absolute !important;
}

    /* Mobile Bottom Bar Container: Compact 10-Button Fit */
    #bottomButtons {
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
        padding: 4px 6px !important;
        gap: 3px !important;
        justify-content: space-evenly !important;
        border-radius: 28px !important;
    }

    /* Mobile Bottom Bar: Display ALL 10 Requested Buttons (mic, camera, swap camera, screen share, hand, chat, cut, participant, settings, ai) */
    #bottomButtons #audioSplit,
    #bottomButtons #videoSplit,
    #bottomButtons #swapCameraBtn,
    #bottomButtons #screenShareBtn,
    #bottomButtons #myHandBtn,
    #bottomButtons #chatRoomBtn,
    #bottomButtons #leaveRoomBtn,
    #bottomButtons #participantsBtn,
    #bottomButtons #settingsSplit,
    #bottomButtons #mySettingsBtn,
    #bottomButtons #happyAiBtn,
    #bottomButtons #screenShareBtn[style*="display: none"],
    #bottomButtons #screenShareBtn[style*="display:none"] {
        display: inline-flex !important;
    }

    /* Hide caret dropdown toggles on mobile split buttons to keep dock compact */
    #bottomButtons .device-dropdown-toggle,
    #bottomButtons .dropdown-toggle,
    #bottomButtons .split-btn button:last-child {
        display: none !important;
    }

    /* Split Button Pill Containers on Mobile */
    #bottomButtons .split-btn {
        display: inline-flex !important;
        align-items: center !important;
        background: transparent !important;
        border: none !important;
        border-radius: 50% !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }

    #bottomButtons #settingsSplit {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        border-radius: 50% !important;
    }

    #bottomButtons .split-btn button {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Compact Primary Control Buttons for Mobile (30px size) */
    #bottomButtons button,
    #bottomButtons #settingsExtraToggle {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        margin: 0 !important;
        font-size: 11px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.14) !important;
        color: #ffffff !important;
        flex-shrink: 0 !important;
    }

    #bottomButtons #settingsExtraToggle i::before {
        content: "\f142" !important; /* 3 Dots icon */
    }

    /* Red Cut Call (Leave Room) Button on Mobile */
    #bottomButtons #leaveRoomBtn {
        width: 34px !important;
        height: 30px !important;
        min-width: 34px !important;
        border-radius: 16px !important;
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(225, 29, 72, 1)) !important;
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5) !important;
        flex-shrink: 0 !important;
    }

    /* Red Muted Mic & Off Camera Buttons */
    .fa-microphone-slash,
    .fa-video-slash,
    button.fa-microphone-slash,
    button.fa-video-slash {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(225, 29, 72, 1)) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 14px rgba(239, 68, 68, 0.6) !important;
    }

    /* Mobile Sidebars & Modals Full Viewport Sheet Mode */
    .msger-draggable,
    #msgerCPSec,
    #aiDraggable,
    #captionDraggable,
    .msger {
        position: fixed !important;
        top: 55px !important;
        bottom: 74px !important;
        left: 8px !important;
        right: 8px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        height: calc(100dvh - 135px) !important;
        max-height: calc(100dvh - 135px) !important;
        border-radius: 20px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95) !important;
        z-index: 10005 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Mobile Settings Modal (#mySettings) Floating Centered Card */
    #mySettings,
    .my-settings {
        position: fixed !important;
        top: 60px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: 92vw !important;
        max-width: 420px !important;
        height: calc(100vh - 135px) !important;
        max-height: calc(100vh - 135px) !important;
        border-radius: 24px !important;
        background: rgba(14, 14, 18, 0.98) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(40px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.98) !important;
        z-index: 100001 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 16px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    #mySettingsHeader,
    .my-settings-header {
        position: sticky !important;
        top: 0 !important;
        background: rgba(14, 14, 18, 1) !important;
        z-index: 10 !important;
        padding-bottom: 10px !important;
    }

/* Hide pre-call setup modal (#initUser) completely on all devices */
#initUser,
.init-user,
#initVideoContainer,
.init-video-container,
.initComands,
.init-modal-size,
.swal2-popup.init-modal-size {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}
        box-sizing: border-box !important;
        background: rgba(14, 16, 26, 0.98) !important;
        backdrop-filter: blur(40px) saturate(200%) !important;
        -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.98) !important;
    }

    #initUser,
    .init-user {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        padding: 0 !important;
        overflow-y: visible !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        box-sizing: border-box !important;
        background: transparent !important;
    }

    #initUser .init-video-container,
    .init-user .init-video-container {
        width: 90vw !important;
        max-width: 320px !important;
        margin: 0 auto 14px auto !important;
        border-radius: 20px !important;
        overflow: hidden !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    }

    #initUser video,
    .init-user video {
        width: 100% !important;
        height: auto !important;
        max-height: 180px !important;
        object-fit: cover !important;
        border-radius: 20px !important;
    }

    /* HORIZONTAL ROW for Pre-Call Buttons */
    #initUser .initComands,
    .init-user .initComands {
        width: 100% !important;
        max-width: 360px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        margin-bottom: 12px !important;
    }

    #initUser .initComands button,
    .init-user .initComands button {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        border-radius: 50% !important;
        font-size: 16px !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #initUser select,
    .init-user select,
    #initUser .form-select {
        width: 100% !important;
        max-width: 340px !important;
        height: 44px !important;
        margin-top: 8px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }
}


/* ==========================================
   🖥️ DESKTOP CHAT & BOTTOM BAR ALIGNMENT (>768px)
   ========================================== */
@media (min-width: 769px) {
    .msger-draggable {
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        bottom: 95px !important;
        height: calc(100vh - 110px) !important;
        max-height: calc(100vh - 110px) !important;
        z-index: 1000 !important;
    }
}

/* ==========================================
   🔧 CRITICAL BUG FIXES - Buttons & Interactions
   ========================================== */

/* Fix: fadein animation must NOT block pointer events during animation */
#bottomButtons.fadein {
    pointer-events: auto !important;
    animation-duration: 0.4s !important;
}

/* Fix: .show class for dropdown menus (they use flex internally) */
#bottomButtons #settingsExtraMenu.show {
    display: flex !important;
    flex-direction: column !important;
}

#bottomButtons #audioMenu.show,
#bottomButtons #videoMenu.show {
    display: block !important;
}

/* Fix: dropup menus must appear above the button bar */
#bottomButtons .dropup .dropdown-menu,
#bottomButtons #settingsExtraMenu:not(.hidden) {
    z-index: 9999 !important;
}

/* Fix: ensure all buttons in #bottomButtons are always clickable */
#bottomButtons,
#bottomButtons > *,
#bottomButtons button,
#bottomButtons .split-btn,
#bottomButtons .device-dropdown-toggle {
    pointer-events: auto !important;
}

/* Fix: video media container must NOT block bottom button clicks */
#videoMediaContainer {
    pointer-events: auto;
}

/* Fix: room title must never block buttons below it */
.room-title {
    pointer-events: auto;
}

/* Fix: My settings panel z-index (must be above video but below critical UI) */
#mySettings {
    z-index: 1050 !important;
}

/* Fix: Chat/Caption panels shouldn't block button bar clicks */
.msger-draggable,
#captionDraggable,
#aiDraggable {
    z-index: 14;
    pointer-events: auto;
}

/* Fix: Swal2 overlay should not permanently hide bottom buttons */
.swal2-container {
    z-index: 9999 !important;
}

/* Fix: Button hover state - faster, feels more responsive */
#bottomButtons button:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    transform: scale(1.1) !important;
    color: #ffffff !important;
}

#bottomButtons button:active {
    transform: scale(0.95) !important;
    background: rgba(255, 255, 255, 0.3) !important;
    transition: transform 0.05s ease !important;
}

/* Fix: leave button hover keeps red */
#bottomButtons #leaveRoomBtn:hover {
    background: #dc2626 !important;
    transform: scale(1.05) !important;
}

#bottomButtons #leaveRoomBtn:active {
    transform: scale(0.96) !important;
}

/* Fix: Dropdown menus in bottom button bar - proper positioning & visibility */
#bottomButtons .dropdown-menu {
    display: none;
}

#bottomButtons .dropdown-menu.show {
    display: block;
    position: absolute;
    bottom: 60px;
    left: 0;
    z-index: 9999;
    min-width: 200px;
    background: rgba(12, 12, 18, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
}

/* Fix: Participants badge display */
#participantsCountBadge[style*="display: block"],
#participantsCountBadge[style*="display:block"],
#participantsCountBadge[style*="display: flex"],
#participantsCountBadge[style*="display:flex"] {
    display: flex !important;
}

/* Fix: video/audio menu show state - dropdown display */
#bottomButtons #audioDropdown:not(.hidden),
#bottomButtons #videoDropdown:not(.hidden) {
    display: inline-flex !important;
}