/* Jitsi Chat Only - Blue Gradient Theme - Clean Version */

/* Hide the tab toggle section completely */
.css-10rokvf-container[role="tablist"] {
    display: none !important;
}

/* Hide polls panel completely */
.css-191yffp-pollsPanel,
#polls-tab-panel {
    display: none !important;
}

/* Chat Header Styling */
.chat-header {
    background: linear-gradient(to right, #5566fe, #4363ff, #288efc) !important;
    color: white !important;
    padding: 16px 20px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 !important;
}

.chat-header span[role="heading"] {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.chat-header .jitsi-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    padding: 8px !important;
    transition: all 0.2s ease !important;
}

.chat-header .jitsi-icon:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05) !important;
}

.chat-header .jitsi-icon svg {
    fill: white !important;
}

/* Main Chat Panel */
.css-1ee6bap-chatPanel {
    background: white !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Chat Conversation Container */
#chat-conversation-container {
    flex: 1 !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    padding: 16px !important;
    overflow-y: auto !important;
}

#chatconversation {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 8px !important;
}

/* Chat Message Styling - Using actual structure */
.chatmessage {
    margin-bottom: 12px !important;
    max-width: 85% !important;
    display: flex !important;
    flex-direction: column !important;
    animation: messageSlideIn 0.3s ease-out !important;
    padding: 12px 16px !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Local User Messages (Sent) - Blue outer wrapper */
.chatmessage.local {
    align-self: flex-end !important;
    align-items: flex-end !important;
    background: linear-gradient(135deg, #5566fe, #4363ff, #288efc) !important;
    color: white !important;
    border-bottom-right-radius: 6px !important;
    margin-left: 20px !important;
    box-shadow: 0 2px 6px rgba(67, 99, 255, 0.3) !important;
}

/* Remote User Messages (Received) - Grey outer wrapper */
.chatmessage:not(.local) {
    align-self: flex-start !important;
    align-items: flex-start !important;
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    border-bottom-left-radius: 6px !important;
    margin-right: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Display Name Styling */
.display-name {
    font-size: 12px !important;
    font-weight: 500 !important;
    margin-bottom: 4px !important;
    padding: 0 4px !important;
}

/* Display name color for local messages */
.chatmessage.local .display-name {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Display name color for remote messages */
.chatmessage:not(.local) .display-name {
    color: #6b7280 !important;
}

/* Message Content Container */
.messagecontent {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

/* User Message Bubble - Remove background since outer wrapper has it now */
.usermessage {
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    word-wrap: break-word !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Message Text */
.usermessage p {
    margin: 0 !important;
    color: inherit !important;
}

/* Screen Reader Text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Message Footer */
.css-n0sz5u-chatMessageFooter {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 8px !important;
    padding-top: 4px !important;
}

/* Timestamp */
.timestamp p {
    font-size: 11px !important;
    margin: 0 !important;
    opacity: 0.8 !important;
}

/* Timestamp for local messages */
.chatmessage.local .timestamp p {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Timestamp for received messages */
.chatmessage:not(.local) .timestamp p {
    color: #94a3b8 !important;
}

/* Chat Input Container */
.chat-input-container {
    background: white !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 16px !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* Input Field Container - Remove inner styling */
.css-1b1hdkw-inputContainer,
.chat-input {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    width: 100% !important;
}

/* Style the outer input container instead */
.chat-input-container {
    background: white !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 16px !important;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04) !important;
}

.chat-input-container > div {
    background: #f8fafc !important;
    border: 2px solid transparent !important;
    border-radius: 24px !important;
    padding: 8px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04) !important;
}

.chat-input-container > div:focus-within {
    border-color: #4363ff !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(67, 99, 255, 0.1), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Emoji Button */
.css-1y59anu-icon-iconClickable {
    background: linear-gradient(135deg, rgba(85, 102, 254, 0.1), rgba(40, 142, 252, 0.1)) !important;
    border-radius: 50% !important;
    padding: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.css-1y59anu-icon-iconClickable:hover {
    background: linear-gradient(135deg, rgba(85, 102, 254, 0.2), rgba(40, 142, 252, 0.2)) !important;
    transform: scale(1.05) !important;
}

.css-1y59anu-icon-iconClickable svg {
    fill: #4363ff !important;
}

/* Text Input */
.css-17h030j-input,
#chat-input-messagebox,
textarea[placeholder*="message"] {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    flex: 1 !important;
    color: #1e293b !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    resize: none !important;
    font-family: inherit !important;
}

.css-17h030j-input::placeholder,
#chat-input-messagebox::placeholder,
textarea[placeholder*="message"]::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* Send Button */
.css-j7vihb-button-primary-disabled-iconButton-medium,
button[aria-label="Send"],
.iconButton {
    background: linear-gradient(135deg, #5566fe, #4363ff, #288efc) !important;
    border: none !important;
    border-radius: 50% !important;
    padding: 10px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(67, 99, 255, 0.3) !important;
    min-width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.css-j7vihb-button-primary-disabled-iconButton-medium:not([disabled]):hover,
button[aria-label="Send"]:not([disabled]):hover,
.iconButton:not([disabled]):hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 8px rgba(67, 99, 255, 0.4) !important;
}

.css-j7vihb-button-primary-disabled-iconButton-medium[disabled],
button[aria-label="Send"][disabled],
.iconButton[disabled] {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.css-j7vihb-button-primary-disabled-iconButton-medium svg,
button[aria-label="Send"] svg,
.iconButton svg {
    fill: white !important;
    width: 20px !important;
    height: 20px !important;
}

/* Scrollbar Styling */
#chat-conversation-container::-webkit-scrollbar {
    width: 6px !important;
}

#chat-conversation-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 3px !important;
}

#chat-conversation-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #5566fe, #288efc) !important;
    border-radius: 3px !important;
}

#chat-conversation-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4363ff, #5566fe) !important;
}

/* Animation for new messages */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatmessage {
        max-width: 90% !important;
    }
    
    .chatmessage {
        padding: 10px 14px !important;
        font-size: 13px !important;
    }
    
    .chat-header {
        padding: 12px 16px !important;
    }
    
    .chat-header span[role="heading"] {
        font-size: 16px !important;
    }
    
    .chat-input-container {
        padding: 12px !important;
    }
}

/* Ensure proper container structure */
.css-g034pt-container {
    background: white !important;
    border-radius: 0 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}


/* Fix receiver message text visibility */
.chatmessage:not(.local) .usermessage,
.chatmessage:not(.local) .usermessage p {
    color: #1f2937 !important;
}


/* Filmstrip Participants Panel Styling */
.filmstrip {
    background: rgba(67, 99, 255, 0.05) !important;
}

/* Individual participant video containers */
.videocontainer {
    background: rgba(67, 99, 255, 0.1) !important;
    border: 2px solid rgba(67, 99, 255, 0.3) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
}

.videocontainer:hover {
    border-color: rgba(67, 99, 255, 0.6) !important;
    background: rgba(67, 99, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(67, 99, 255, 0.4) !important;
}

/* Container background styling */
.css-gkd3ep-withI18nextTranslation_due_-containerBackground {
    background: rgba(67, 99, 255, 0.08) !important;
    border-radius: 12px !important;
}

/* Filmstrip background */
.css-1iam9u8-withI18nextTranslation_Connect_gue__-filmstripBackground {
    background: rgba(67, 99, 255, 0.03) !important;
}

/* DISABLE ONLY TOP DROPDOWN MENU CONTAINER - KEEP BOTTOM CONTAINER */
.css-42knn7-withI18nextTranslation_Thumbnail_-indicatorsTopContainer {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* TARGET ONLY TOP INDICATOR CONTAINERS - PRESERVE BOTTOM CONTAINERS */
[class*="withI18nextTranslation_Thumbnail_-indicatorsTopContainer"],
[class*="indicatorsTopContainer"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* HIDE SPECIFIC DROPDOWN MENU BUTTONS INSIDE CONTAINERS */
[class*="indicatorsContainer"] button[aria-haspopup="true"],
[class*="indicatorsContainer"] [role="button"][aria-haspopup="true"],
[class*="indicatorsContainer"] .popover-trigger,
[class*="indicatorsContainer"] .menu-trigger {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}







/* ===== Performance Settings Dialog Styling ===== */

/* Modal backdrop */
.css-1d6r48v-focusLock {
    backdrop-filter: none !important;
    background: transparent !important;
}

/* Main modal container */
.css-1j56r58-modal.medium {
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 50%, #f0f4ff 100%) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(85, 102, 254, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(85, 102, 254, 0.1) !important;
    overflow: hidden !important;
    max-width: 520px !important;
    width: 92% !important;
    position: relative;
    animation: modalSlideIn 0.3s ease-out !important;
}

/* Add subtle gradient overlay */
.css-1j56r58-modal.medium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #5566fe 0%, #4363ff 50%, #288efc 100%);
    z-index: 1;
}

/* Modal header */
.css-18l8j8p-header {
    background: linear-gradient(135deg, #5566fe 0%, #4363ff 50%, #288efc 100%) !important;
    padding: 20px 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: none !important;
    position: relative;
    z-index: 2;
}

/* Add subtle pattern to header */
.css-18l8j8p-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='3' cy='3' r='2'/%3E%3Ccircle cx='13' cy='13' r='2'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Dialog title */
.css-1hswjvd-title#dialog-title {
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0 !important;
    position: relative;
    z-index: 3;
}

/* Close button */
.css-kubkec-button#modal-header-close-button {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    z-index: 3;
}

.css-kubkec-button#modal-header-close-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05) !important;
}

.css-kubkec-button .jitsi-icon svg {
    width: 20px !important;
    height: 20px !important;
}

.css-kubkec-button .jitsi-icon svg path {
    fill: #ffffff !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Modal content */
.css-rhnteu-content {
    padding: 32px 24px !important;
    background: transparent !important;
}

/* Video quality dialog container */
.video-quality-dialog.css-1kyesow-Pbe-dialog {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 12px !important;
    padding: 24px !important;
    border: 1px solid rgba(85, 102, 254, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: none !important;
}

/* Dialog details */
.css-rbl16s-Pbe-dialogDetails {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
}

/* Dialog contents */
.css-16bud0d-Pbe-dialogContents {
    display: flex !important;
    flex-direction: column !important;
    background: none !important;
   padding:0 10px !important;
     gap: 20px !important;
}

/* Slider description */
.css-hxat6p-Pbe-sliderDescription {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    margin-bottom: 8px !important;
}

.css-hxat6p-Pbe-sliderDescription span:first-child {
    color: #ef4444 !important;
    font-weight: 600 !important;
}

.css-hxat6p-Pbe-sliderDescription span:last-child {
    color: #10b981 !important;
    font-weight: 600 !important;
}

/* Slider container */
.css-1jhfxgh-sliderContainer {
    position: relative !important;
    padding: 20px 0 !important;
    background: transparent !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 310px !important;
}

/* Slider track */
.css-lhjbu7-track {
    width: 100% !important;
    height: 6px !important;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 33%, #10b981 66%, #059669 100%) !important;
    border-radius: 3px !important;
    position: relative !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Knob container */
.css-5lg9h3-knobContainer {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    justify-content: space-between !important;
    margin: 0 !important;
    list-style: none !important;
    z-index: 2 !important;
}

/* Individual knobs */
.css-1s359ik-knob {
    width: 16px !important;
    height: 16px !important;
    background: #ffffff !important;
    border: 3px solid #5566fe !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 6px rgba(85, 102, 254, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    position: relative !important;
}

.css-1s359ik-knob:hover {
    border-color: #4455ed !important;
    transform: scale(1.2) !important;
    box-shadow: 0 4px 12px rgba(85, 102, 254, 0.4) !important;
}

.css-1s359ik-knob::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #5566fe;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.css-1s359ik-knob:hover::before,
.css-1s359ik-knob.active::before {
    opacity: 1;
}

/* Custom slider input */
.css-k4vg72-slider.custom-slider {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 6px !important;
    background: transparent !important;
    outline: none !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%) !important;
    z-index: 3 !important;
    cursor: pointer !important;
}

/* Slider thumb */
.css-k4vg72-slider.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    background: linear-gradient(135deg, #5566fe 0%, #4363ff 100%) !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 3px 8px rgba(85, 102, 254, 0.4) !important;
    transition: all 0.3s ease !important;
}

.css-k4vg72-slider.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2) !important;
    box-shadow: 0 4px 12px rgba(85, 102, 254, 0.5) !important;
}

.css-k4vg72-slider.custom-slider::-moz-range-thumb {
    width: 20px !important;
    height: 20px !important;
    background: linear-gradient(135deg, #5566fe 0%, #4363ff 100%) !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 3px 8px rgba(85, 102, 254, 0.4) !important;
    transition: all 0.3s ease !important;
}

/* Modal footer */
.css-1gaf67c-footer {
    padding: 16px 24px !important;
    background: rgba(248, 250, 252, 0.8) !important;
    border-top: 1px solid rgba(85, 102, 254, 0.1) !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}

/* Add subtle animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive adjustments for dialog */
@media (max-width: 768px) {
    .css-1j56r58-modal.medium {
        width: 95% !important;
        margin: 20px !important;
        max-width: 95% !important;
    }
    
    .css-18l8j8p-header {
        padding: 16px 20px !important;
    }
    
    .css-rhnteu-content {
        padding: 24px 20px !important;
    }
    
    .css-1hswjvd-title#dialog-title {
        font-size: 18px !important;
    }
    
    .css-1jhfxgh-sliderContainer {
        min-width: 280px !important;
    }
    
    .css-5lg9h3-knobContainer {
        padding: 0 10px !important;
    }
}

/* ADD THESE AT THE END - Z-INDEX OVERRIDES */
/* Force override Jitsi's sidebar z-index */
.css-g034pt-container {
    z-index: 299 !important;
}
