.dw-live-queue-status {
    flex: 0 0 auto;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255, 126, 32, 0.28);
    background: #2d1b0f;
    color: #ffc899;
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
}

.dw-live-queue-status[data-state="active"] {
    border-bottom-color: rgba(46, 139, 87, 0.24);
    background: #10291d;
    color: #83e5ad;
}

body.light-mode .dw-live-queue-status {
    border-bottom-color: #ffd5b8;
    background: #fff4e8;
    color: #a84600;
}

body.light-mode .dw-live-queue-status[data-state="active"] {
    border-bottom-color: #bde8cf;
    background: #eaf9f0;
    color: #1b6f42;
}

.dw-widget-queue-status {
    flex: 0 0 auto;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 107, 0, 0.2);
    background: #fff5eb;
    color: #a84600;
    font-size: 0.78rem;
    font-weight: 750;
    text-align: center;
}

.dw-widget-queue-status[data-state="active"] {
    border-bottom-color: #bde8cf;
    background: #eaf9f0;
    color: #1b6f42;
}

.dw-widget-queue-status[data-state="closed"] {
    border-bottom-color: rgba(86, 96, 116, 0.2);
    background: #f0f3f7;
    color: #475569;
}

#digix-chat-window.dark-mode .dw-widget-queue-status[data-state="closed"] {
    border-bottom-color: rgba(148, 163, 184, 0.2);
    background: #20242c;
    color: #d3dae6;
}

#digix-chat-window.conversation-resolved .chat-form {
    opacity: 1;
}

#digix-chat-window.dark-mode .dw-widget-queue-status {
    border-bottom-color: rgba(255, 126, 32, 0.24);
    background: #2d1b0f;
    color: #ffc899;
}

#digix-chat-window.dark-mode .dw-widget-queue-status[data-state="active"] {
    border-bottom-color: rgba(46, 139, 87, 0.24);
    background: #10291d;
    color: #83e5ad;
}

#digix-chat-unread-badge.has-unread {
    opacity: 1;
    transform: scale(1);
}
#digix-sound-toggle .sound-muted-mark { display: none; }
#digix-sound-toggle.sound-muted .sound-wave { display: none; }
#digix-sound-toggle.sound-muted .sound-muted-mark { display: block; }
.dw-notification-optin { margin-left: 8px; padding: 4px 9px; border: 1px solid currentColor; border-radius: 999px; color: inherit; background: rgba(255,255,255,.72); font: inherit; font-weight: 850; cursor: pointer; }
.dw-resolved-rating { display: grid; gap: 3px; color: #6f645c; font-size: 11px; font-weight: 750; }
.dw-resolved-rating-stars { display: flex; gap: 2px; }
.dw-resolved-rating-stars button { padding: 0; border: 0; color: #ff8b1c; background: transparent; font-size: 17px; line-height: 1; cursor: pointer; transition: transform .15s ease; }
.dw-resolved-rating-stars button:hover { transform: translateY(-1px) scale(1.12); }
.dw-resolved-rating-stars button:disabled { cursor: wait; opacity: .55; }

/* Queue and resolved-conversation surfaces are injected after initial paint.
   Cover both theme models: widget class-based dark mode and the standalone
   page's dark-by-default body. */
#digix-chat-window.dark-mode .dw-notification-optin,
body:not(.light-mode) #digix-chat-window.chat-app .dw-notification-optin {
    border-color: rgba(255, 197, 148, 0.5);
    background: rgba(255, 255, 255, 0.075);
    color: #ffe0c4;
}

#digix-chat-window.dark-mode .dw-notification-optin:hover,
#digix-chat-window.dark-mode .dw-notification-optin:focus-visible,
body:not(.light-mode) #digix-chat-window.chat-app .dw-notification-optin:hover,
body:not(.light-mode) #digix-chat-window.chat-app .dw-notification-optin:focus-visible {
    border-color: rgba(255, 197, 148, 0.72);
    background: rgba(255, 138, 46, 0.16);
    outline: 3px solid rgba(255, 106, 0, 0.11);
    outline-offset: 2px;
}

#digix-chat-window.dark-mode .dw-resolved-rating,
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-rating {
    color: #bdc6d4;
}

#digix-chat-window.dark-mode .dw-resolved-rating-feedback,
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-rating-feedback {
    border-color: rgba(52, 211, 153, 0.2);
    background: rgba(8, 11, 16, 0.58);
    color: #edfdf7;
    caret-color: #6ee7b7;
    color-scheme: dark;
}

#digix-chat-window.dark-mode .dw-resolved-rating-feedback::placeholder,
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-rating-feedback::placeholder {
    color: #8390a2;
}

#digix-chat-window.dark-mode .dw-resolved-rating-feedback:focus,
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-rating-feedback:focus {
    border-color: rgba(52, 211, 153, 0.48);
    outline: 3px solid rgba(16, 185, 129, 0.11);
}

#digix-chat-window.dark-mode .dw-resolved-rating-submit,
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-rating-submit {
    color: #fff;
    background: linear-gradient(135deg, #047857, #10b981);
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.24);
}

#digix-chat-window.dark-mode .dw-resolved-rating-stars button:not(.selected),
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-rating-stars button:not(.selected) {
    color: #697386;
}

#digix-chat-window.dark-mode .dw-resolved-rating-stars button:focus-visible,
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-rating-stars button:focus-visible {
    border-radius: 4px;
    outline: 2px solid rgba(255, 157, 46, 0.62);
    outline-offset: 2px;
}

#digix-chat-window.dark-mode .dw-resolved-composer-restart,
body:not(.light-mode) #digix-chat-window.chat-app .dw-resolved-composer-restart,
body:not(.light-mode) #digix-chat-window.chat-app .chat-start-new-button {
    border-color: rgba(52, 211, 153, 0.25);
    color: #ecfdf5;
}

#digix-chat-window.dark-mode .dw-history-viewer-actions button:not(.primary),
body:not(.light-mode) #digix-chat-window.chat-app .dw-history-viewer-actions button:not(.primary),
body:not(.light-mode) #digix-chat-window.chat-app .chat-start-new-button.secondary {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.055);
    color: #cbd5e1;
}

#digix-chat-window.dark-mode .dw-chat-history-empty,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-history-empty {
    color: #9da8b8;
}

#digix-chat-window.dark-mode .dw-chat-history-empty strong,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-history-empty strong {
    color: #f3f5f9;
}
