.dw-chat-quick-actions {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    flex: 0 0 auto;
    background: rgba(255, 249, 244, 0.96);
    border-top: 1px solid rgba(255, 107, 0, 0.12);
}

body:not(.light-mode) .dw-chat-quick-actions {
    background: rgba(18, 20, 28, 0.95);
    border-top-color: rgba(255, 107, 0, 0.14);
}

.dw-chat-quick-actions::-webkit-scrollbar {
    display: none;
}

/* Shared premium quick-action tiles — floating widget + /live-chat */
#digix-self-service-actions.dw-chat-quick-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 16px 24px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none; /* Firefox */
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    background: transparent; /* inherit from chat window */
}

#digix-self-service-actions.dw-chat-quick-actions::-webkit-scrollbar {
    display: none;
}

#digix-self-service-actions .dw-chat-quick-action {
    position: relative;
    flex: 0 0 auto;
    height: 40px;
    padding: 0 16px 0 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    border: 1px solid var(--glass-border-light) !important;
    border-radius: 20px !important;
    background: var(--glass-bg-light) !important;
    color: var(--text-primary) !important;
    font: 600 13px/1 Inter, sans-serif;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, background 0.2s ease;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

#digix-self-service-actions .dw-chat-quick-action::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.8), transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
    pointer-events: none;
    border-radius: 20px;
}

#digix-self-service-actions .dw-chat-quick-action:hover,
#digix-self-service-actions .dw-chat-quick-action:focus-visible {
    background: #ffffff !important;
    border-color: rgba(255, 107, 0, 0.2) !important;
    color: #ea580c !important;
    outline: none;
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.12) !important;
    transform: translateY(-2px);
}

#digix-self-service-actions .dw-chat-quick-action:hover::after,
#digix-self-service-actions .dw-chat-quick-action:focus-visible::after {
    transform: translateX(120%);
}

#digix-self-service-actions .dw-chat-quick-action-icon {
    display: inline-grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 107, 0, 0.08);
    color: #ea580c;
    font-size: 12px;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

#digix-self-service-actions .dw-chat-quick-action:hover .dw-chat-quick-action-icon,
#digix-self-service-actions .dw-chat-quick-action:focus-visible .dw-chat-quick-action-icon {
    background: linear-gradient(135deg, #ff6b00, #ff8a00);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
    transform: scale(1.05);
}

#digix-self-service-actions .dw-chat-quick-action-label {
    max-width: none;
    overflow: visible;
    display: block;
}

#digix-chat-window.dark-mode #digix-self-service-actions.dw-chat-quick-actions,
body:not(.light-mode) .chat-app #digix-self-service-actions.dw-chat-quick-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: transparent;
}

#digix-chat-window.dark-mode #digix-self-service-actions .dw-chat-quick-action,
body:not(.light-mode) .chat-app #digix-self-service-actions .dw-chat-quick-action {
    border-color: rgba(255, 255, 255, 0.12) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #e8ebf2 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

#digix-chat-window.dark-mode #digix-self-service-actions .dw-chat-quick-action-icon,
body:not(.light-mode) .chat-app #digix-self-service-actions .dw-chat-quick-action-icon {
    background: rgba(255, 106, 0, 0.15);
    color: #ffb273;
}

.dw-chat-quick-action {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 107, 0, 0.22);
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font: 700 12px/1.1 Inter, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.dw-chat-quick-action:hover,
.dw-chat-quick-action:focus-visible {
    background: #fff4e9;
    border-color: #ff6b00;
    color: #d94f00;
    outline: none;
    transform: translateY(-1px);
}

.dw-chat-quick-action:disabled {
    opacity: 0.62;
    cursor: wait;
}

/* Stable widget composer: one clear row, even with long translated placeholders. */
#digix-chat-window .chat-form {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 74px;
    padding: 13px 14px;
    box-sizing: border-box;
    flex: 0 0 auto;
}

@media (min-width: 900px) {
    #digix-chat-window {
        width: min(520px, calc(100vw - 48px));
        height: min(720px, calc(100dvh - 130px));
        max-height: 820px;
    }

    #digix-chat-window .card-message,
    #digix-chat-window .dw-self-service-card {
        max-width: 430px;
    }
}

#digix-chat-window #digix-attach-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    box-sizing: border-box;
    border: 1px solid rgba(255, 107, 0, 0.18) !important;
    border-radius: 13px;
    background: #fff7f0 !important;
    color: #d95700 !important;
}

#digix-chat-window #digix-chat-input {
    width: 100%;
    min-width: 0;
    height: 46px;
    min-height: 46px;
    max-height: 96px;
    margin: 0;
    padding: 11px 15px;
    box-sizing: border-box;
    overflow-y: auto;
    border: 1px solid #e3e7ee;
    border-radius: 16px;
    background: #f8fafc;
    color: #1f2937;
    /* Keep the final computed size at 16px. iOS Safari zooms the whole page
       when a focused text field is rendered below 16px. */
    font-size: 16px;
    font-weight: 550;
    line-height: 22px;
}

#digix-chat-window #digix-chat-input::placeholder {
    overflow: hidden;
    color: #8b95a5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#digix-chat-window .chat-form .send-button {
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    flex: 0 0 46px;
}

#digix-chat-window .chat-form button:disabled {
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

#digix-chat-window.conversation-resolved .chat-form {
    display: block;
    min-height: 84px;
    padding: 12px 14px;
    opacity: 1;
    background: #fff;
}

#digix-chat-window.conversation-resolved .chat-form > :not(.dw-resolved-composer) {
    display: none !important;
}

.dw-resolved-composer {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 8px 9px;
    box-sizing: border-box;
    border: 1px solid rgba(5, 150, 105, 0.18);
    border-radius: 16px;
    background: linear-gradient(135deg, #f0fdf6, #fff);
}

.dw-resolved-composer-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: #dcfce7;
    color: #047857;
    font-size: 16px;
    font-weight: 900;
}

.dw-resolved-composer-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.dw-resolved-composer-copy strong {
    overflow: hidden;
    color: #17392b;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-resolved-composer-copy small {
    overflow: hidden;
    color: #64748b;
    font-size: 8px;
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-resolved-composer-restart {
    min-height: 36px;
    padding: 8px 11px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff5a00, #ff8b16);
    box-shadow: 0 7px 16px rgba(255, 91, 0, 0.2);
    color: #fff;
    font: 800 9px/1 Inter, sans-serif;
    cursor: pointer;
    white-space: nowrap;
}

#digix-chat-window .status-badge[data-online="false"] {
    color: #7a4d00;
    border-color: rgba(245, 158, 11, .34);
    background: rgba(255, 247, 218, .92);
}

#digix-chat-window.dw-chat-drag-active,
.chat-app.dw-chat-drag-active {
    outline: 3px solid rgba(255, 106, 0, .72);
    outline-offset: -7px;
}

#digix-chat-window.dw-chat-drag-active::after,
.chat-app.dw-chat-drag-active::after {
    position: absolute;
    inset: 76px 18px 86px;
    z-index: 30;
    display: grid;
    place-items: center;
    border: 2px dashed rgba(255, 106, 0, .7);
    border-radius: 20px;
    color: #9f3f00;
    background: rgba(255, 248, 241, .94);
    content: "Drop image to send securely";
    font-weight: 850;
    pointer-events: none;
}

#digix-chat-window .status-badge[data-online="false"] .pulse-dot,
#digix-chat-window .status-badge[data-online="false"] + .status-dot-online {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, .16);
    animation: none;
}

#digix-chat-window.dark-mode .dw-resolved-composer {
    border-color: rgba(52, 211, 153, 0.2);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.34), rgba(28, 30, 37, 0.98));
}

#digix-chat-window.dark-mode .dw-resolved-composer-copy strong {
    color: #d1fae5;
}

#digix-chat-window.dark-mode .dw-resolved-composer-copy small {
    color: #a7b2c2;
}

@media (max-width: 380px) {
    .dw-resolved-composer {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 7px;
        padding: 7px;
    }

    .dw-resolved-composer-icon {
        width: 30px;
        height: 30px;
    }

    .dw-resolved-composer-copy small {
        display: none;
    }

    .dw-resolved-composer-restart {
        padding-inline: 9px;
    }
}

#digix-chat-window .dw-chat-quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
    gap: 8px;
}

#digix-chat-window .dw-chat-quick-action {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    padding: 8px 8px;
    font-size: 0.68rem;
    line-height: 1.15;
    white-space: normal;
}

#digix-chat-window .dw-chat-quick-action:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
}

#digix-chat-window .card-message {
    width: min(88%, 340px);
    max-width: 340px;
    padding: 0;
    overflow: hidden;
    background: #fff !important;
}

#digix-chat-window .digix-card {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 107, 0, 0.16);
    border-radius: 16px;
    background: #fff;
}

#digix-chat-window .digix-card-image {
    display: block;
    width: 100%;
    height: 138px;
    object-fit: contain;
    background: #fff8f2;
}

#digix-chat-window .digix-card-body {
    padding: 14px;
}

#digix-chat-window .digix-card-body h4,
#digix-chat-window .digix-card-body p,
#digix-chat-window .digix-card-body .card-details {
    margin: 0 0 8px;
    color: #344054;
}

#digix-chat-window .digix-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff6b00, #ff8a00);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(255, 107, 0, 0.24);
}

.dw-self-service-card {
    align-self: flex-start;
    width: min(92%, 360px);
    box-sizing: border-box;
    padding: 14px;
    margin: 2px 0;
    border: 1px solid var(--glass-border-light);
    border-radius: 16px 16px 16px 5px;
    background: var(--glass-bg-light);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    font: 500 13px/1.45 Inter, sans-serif;
}

.dw-self-service-card.page {
    margin-left: 48px;
}

.dw-self-service-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.dw-self-service-card-head strong {
    font-size: 14px;
    color: #111827;
}

.dw-self-service-card p {
    margin: 0 0 10px;
    color: #667085;
}

.dw-self-service-badge,
.dw-self-service-order-status {
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff0e4;
    color: #d94f00;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dw-self-service-orders {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.dw-self-service-order {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
}

.dw-self-service-order > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.dw-self-service-order strong,
.dw-self-service-order span,
.dw-self-service-order small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-self-service-order span {
    max-width: 210px;
    color: #475569;
    font-size: 11px;
}

.dw-self-service-order small {
    color: #94a3b8;
    font-size: 10px;
}

.dw-self-service-order-status.paid {
    background: #dcfce7;
    color: #15803d;
}

.dw-self-service-order-status.pending {
    background: #fff7ed;
    color: #c2410c;
}

.dw-self-service-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.dw-self-service-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    box-sizing: border-box;
    padding: 8px 11px;
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 10px;
    background: #fff7ed;
    color: #c2410c;
    font: 800 11px/1 Inter, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.dw-self-service-link.primary {
    border-color: transparent;
    background: linear-gradient(135deg, #ff6b00, #ff8a00);
    color: #fff;
}

.dw-delivery-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.dw-delivery-item {
    display: grid;
    gap: 5px;
    padding: 11px;
    border: 1px solid #edf0f4;
    border-radius: 12px;
    background: #f8fafc;
}

.dw-delivery-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.dw-delivery-state {
    flex: 0 0 auto;
    padding: 4px 7px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.dw-delivery-state.ready {
    background: #dcfce7;
    color: #15803d;
}

.dw-delivery-state.awaiting {
    background: #fef2f2;
    color: #b91c1c;
}

.dw-delivery-state.manual {
    background: #eff6ff;
    color: #1d4ed8;
}

.dw-delivery-product,
.dw-delivery-meta,
.dw-delivery-resend-note {
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-delivery-product {
    color: #344054;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.dw-delivery-item .dw-delivery-detail {
    margin: 0;
    color: #667085;
    font-size: 11px;
}

.dw-delivery-meta,
.dw-delivery-resend-note {
    color: #98a2b3;
    font-size: 9px;
    line-height: 1.35;
}

.dw-delivery-resend-note {
    color: #b45309;
}

.dw-activation-families,
.dw-activation-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.dw-activation-families .dw-self-service-link.selected {
    border-color: #ff6b00;
    background: #ffede0;
    color: #c2410c;
}

.dw-activation-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    margin-top: 9px;
}

.dw-activation-form input {
    min-width: 0;
    height: 36px;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font: 600 11px/1 Inter, sans-serif;
}

.dw-activation-form input:focus {
    border-color: #ff6b00;
    outline: 2px solid rgba(255, 107, 0, 0.12);
}

.dw-activation-examples button {
    min-height: 26px;
    padding: 5px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #667085;
    font: 800 9px/1 Inter, sans-serif;
    cursor: pointer;
}

.dark-mode .dw-chat-quick-actions,
#digix-chat-window.dark-mode .dw-chat-quick-actions {
    background: rgba(20, 20, 20, 0.97);
    border-color: rgba(255, 255, 255, 0.08);
}

.dark-mode .dw-chat-quick-action,
#digix-chat-window.dark-mode .dw-chat-quick-action,
.dark-mode .dw-self-service-card,
#digix-chat-window.dark-mode .dw-self-service-card {
    background: #252525;
    border-color: rgba(255, 160, 89, 0.24);
    color: #f3f4f6;
}

/* Shared premium tiles live in the #digix-self-service-actions rules above. */
#digix-chat-widget #digix-chat-window.dark-mode #digix-self-service-actions .dw-chat-quick-action {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.dark-mode .dw-self-service-card-head strong,
#digix-chat-window.dark-mode .dw-self-service-card-head strong {
    color: #fff;
}

.dark-mode .dw-self-service-card p,
#digix-chat-window.dark-mode .dw-self-service-card p {
    color: #cbd5e1;
}

.dark-mode .dw-self-service-order,
#digix-chat-window.dark-mode .dw-self-service-order {
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .dw-delivery-item,
#digix-chat-window.dark-mode .dw-delivery-item {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
}

.dark-mode .dw-delivery-product,
#digix-chat-window.dark-mode .dw-delivery-product {
    color: #f3f4f6;
}

.dark-mode .dw-activation-form input,
#digix-chat-window.dark-mode .dw-activation-form input,
.dark-mode .dw-activation-examples button,
#digix-chat-window.dark-mode .dw-activation-examples button {
    border-color: rgba(255, 255, 255, 0.12);
    background: #191919;
    color: #e5e7eb;
}

#digix-chat-window.dark-mode .card-message,
#digix-chat-window.dark-mode .digix-card {
    border-color: rgba(255, 160, 89, 0.2);
    background: #252525 !important;
}

#digix-chat-window.dark-mode .digix-card-image {
    background: #191919;
}

#digix-chat-window.dark-mode .digix-card-body h4,
#digix-chat-window.dark-mode .digix-card-body p,
#digix-chat-window.dark-mode .digix-card-body .card-details {
    color: #f3f4f6;
}

@media (max-width: 480px) {
    .dw-chat-quick-actions {
        padding: 9px 12px;
    }

    .dw-self-service-card {
        width: min(94%, 360px);
    }

    .dw-self-service-card.page {
        margin-left: 42px;
    }

    #digix-chat-window .dw-chat-quick-action {
        font-size: 0.66rem;
    }

    .dw-activation-form {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
 * Standalone live-chat page (live-chat.html) is dark-by-default —
 * it toggles `body.light-mode` instead of `.dark-mode`, so the
 * `.dark-mode` overrides above never fire there and the injected
 * self-service cards render with their light defaults (white boxes)
 * on the dark page. Scope dark defaults to `.chat-app` (the page's
 * <main id="digix-chat-window" class="chat-app">) so the floating
 * widget — whose root is NOT .chat-app — is unaffected, and let
 * `body.light-mode` fall back to the light base styles.
 * ============================================================ */
body:not(.light-mode) .chat-app .dw-chat-quick-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(28, 30, 40, 0.96), rgba(18, 20, 28, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
body:not(.light-mode) .chat-app .dw-chat-quick-action {
    border-color: rgba(255, 144, 65, 0.22) !important;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)) !important;
    color: #e8ebf2 !important;
    box-shadow:
        0 8px 18px rgba(255, 106, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
body:not(.light-mode) .chat-app .dw-chat-quick-action-icon {
    background: linear-gradient(145deg, rgba(255, 106, 0, 0.22), rgba(255, 138, 0, 0.1));
    color: #ffb273;
    box-shadow: inset 0 0 0 1px rgba(255, 144, 65, 0.12);
}
body:not(.light-mode) .chat-app .dw-self-service-card {
    background: #1c1c22;
    border-color: rgba(255, 160, 89, 0.24);
    color: #f3f4f6;
}
body:not(.light-mode) .chat-app .dw-chat-quick-action:hover,
body:not(.light-mode) .chat-app .dw-chat-quick-action:focus-visible {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 237, 213, 0.08)) !important;
    border-color: rgba(255, 106, 0, 0.42) !important;
    color: #ffb273 !important;
    box-shadow:
        0 12px 26px rgba(255, 106, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}
body:not(.light-mode) .chat-app .dw-chat-quick-action:hover .dw-chat-quick-action-icon,
body:not(.light-mode) .chat-app .dw-chat-quick-action:focus-visible .dw-chat-quick-action-icon {
    background: linear-gradient(135deg, #ff6b00, #ff8a00);
    color: #fff;
    box-shadow: 0 6px 14px rgba(255, 106, 0, 0.28);
    transform: translateY(-1px) scale(1.04);
}
body:not(.light-mode) .chat-app .dw-self-service-card-head strong {
    color: #fff;
}
body:not(.light-mode) .chat-app .dw-self-service-card p,
body:not(.light-mode) .chat-app .dw-self-service-order span {
    color: #cbd5e1;
}
body:not(.light-mode) .chat-app .dw-self-service-order small,
body:not(.light-mode) .chat-app .dw-delivery-meta,
body:not(.light-mode) .chat-app .dw-delivery-resend-note {
    color: #94a3b8;
}
body:not(.light-mode) .chat-app .dw-self-service-order,
body:not(.light-mode) .chat-app .dw-delivery-item {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}
body:not(.light-mode) .chat-app .dw-delivery-product {
    color: #f3f4f6;
}
body:not(.light-mode) .chat-app .dw-delivery-item .dw-delivery-detail {
    color: #cbd5e1;
}
body:not(.light-mode) .chat-app .dw-activation-form input,
body:not(.light-mode) .chat-app .dw-activation-examples button {
    border-color: rgba(255, 255, 255, 0.12);
    background: #191919;
    color: #e5e7eb;
}
body:not(.light-mode) .chat-app .card-message,
body:not(.light-mode) .chat-app .digix-card {
    border-color: rgba(255, 160, 89, 0.2);
    background: #1c1c22 !important;
}
body:not(.light-mode) .chat-app .digix-card-image {
    background: #191919;
}
body:not(.light-mode) .chat-app .digix-card-body h4,
body:not(.light-mode) .chat-app .digix-card-body p,
body:not(.light-mode) .chat-app .digix-card-body .card-details {
    color: #f3f4f6;
}

/* Secure Installation ID screenshot/text → Confirmation ID helper */
.dw-cid-helper-card {
    position: relative;
    overflow: hidden;
}

.dw-cid-helper-card.page {
    width: min(92%, 560px);
}

.dw-cid-helper-card::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -70px;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.14), transparent 68%);
}

.dw-cid-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0 12px;
    padding: 10px 11px;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: 12px;
    background: rgba(236, 253, 245, 0.82);
    color: #047857;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.45;
}

.dw-cid-privacy > span:first-child {
    flex: 0 0 auto;
}

.dw-cid-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: #f1f5f9;
}

.dw-cid-tabs button {
    min-height: 34px;
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #64748b;
    font: 800 10px/1 Inter, sans-serif;
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dw-cid-tabs button:hover,
.dw-cid-tabs button:focus-visible {
    color: #c2410c;
    outline: none;
}

.dw-cid-tabs button.active {
    background: #fff;
    color: #c2410c;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.dw-cid-form {
    display: grid;
    gap: 10px;
    margin-top: 11px;
}

.dw-cid-field {
    display: grid;
    gap: 6px;
    color: #344054;
    font-size: 10px;
    font-weight: 800;
}

.dw-cid-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.dw-cid-counter {
    color: #98a2b3;
    font-size: 9px;
    font-weight: 750;
}

.dw-cid-counter.complete {
    color: #059669;
}

.dw-cid-field input,
.dw-cid-field textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #d8dee8;
    border-radius: 11px;
    background: #fff;
    color: #111827;
    font: 650 11px/1.45 Inter, sans-serif;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.dw-cid-field input {
    min-height: 40px;
    padding: 9px 11px;
}

.dw-cid-field textarea {
    min-height: 58px;
    padding: 10px 11px;
    resize: vertical;
    letter-spacing: 0.025em;
}

.dw-cid-field input:focus,
.dw-cid-field textarea:focus {
    border-color: #ff6b00;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

.dw-cid-upload {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 72px;
    box-sizing: border-box;
    padding: 12px;
    border: 1px dashed rgba(255, 107, 0, 0.45);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.92), rgba(250, 245, 255, 0.88));
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.dw-cid-upload:hover,
.dw-cid-upload:focus-within,
.dw-cid-upload:focus-visible {
    border-color: #ff6b00;
    outline: none;
    background: linear-gradient(135deg, #fff3e8, #f7eeff);
    box-shadow: 0 8px 22px rgba(255, 107, 0, 0.11);
    transform: translateY(-1px);
}

.dw-cid-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.dw-cid-upload-icon {
    display: grid;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff6b00, #8b5cf6);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.18);
}

.dw-cid-upload-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.dw-cid-upload-copy strong {
    color: #1f2937;
    font-size: 11px;
}

.dw-cid-upload-copy small {
    color: #94a3b8;
    font-size: 9px;
}

.dw-cid-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
}

.dw-cid-divider::before,
.dw-cid-divider::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: rgba(148, 163, 184, 0.24);
}

.dw-cid-status {
    padding: 9px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.dw-cid-status.working {
    background: #fff7ed;
    color: #c2410c;
    animation: dw-cid-status-pulse 1.25s ease-in-out infinite;
}

.dw-cid-status.success {
    background: #ecfdf5;
    color: #047857;
}

.dw-cid-status.error {
    background: #fef2f2;
    color: #b91c1c;
}

.dw-cid-confirm {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #64748b;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
    cursor: pointer;
}

.dw-cid-confirm input {
    width: 15px;
    height: 15px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #ff6b00;
}

.dw-cid-submit {
    width: 100%;
    min-height: 42px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 22px rgba(255, 107, 0, 0.2);
}

.dw-cid-helper-card.is-busy .dw-cid-submit {
    cursor: wait;
    opacity: 0.78;
}

.dw-cid-result {
    display: grid;
    gap: 7px;
    padding: 12px;
    border-radius: 13px;
    animation: dw-cid-result-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dw-cid-result[hidden] {
    display: none;
}

.dw-cid-result.success {
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: linear-gradient(145deg, rgba(236, 253, 245, 0.96), rgba(239, 246, 255, 0.96));
}

.dw-cid-result.error {
    border: 1px solid rgba(239, 68, 68, 0.16);
    background: #fff7f7;
}

.dw-cid-result strong {
    color: #111827;
    font-size: 12px;
}

.dw-cid-result p {
    margin: 0;
    font-size: 10px;
}

.dw-cid-result-eyebrow {
    color: #047857;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dw-cid-value {
    display: block;
    overflow-wrap: anywhere;
    padding: 10px;
    border: 1px solid rgba(16, 185, 129, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.84);
    color: #065f46;
    font: 800 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.03em;
    user-select: all;
}

.dw-cid-secondary-actions {
    padding-top: 2px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.dark-mode .dw-cid-privacy,
#digix-chat-window.dark-mode .dw-cid-privacy,
body:not(.light-mode) .chat-app .dw-cid-privacy {
    border-color: rgba(52, 211, 153, 0.18);
    background: rgba(6, 78, 59, 0.22);
    color: #a7f3d0;
}

.dark-mode .dw-cid-tabs,
#digix-chat-window.dark-mode .dw-cid-tabs,
body:not(.light-mode) .chat-app .dw-cid-tabs {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.22);
}

.dark-mode .dw-cid-tabs button.active,
#digix-chat-window.dark-mode .dw-cid-tabs button.active,
body:not(.light-mode) .chat-app .dw-cid-tabs button.active {
    background: rgba(255, 255, 255, 0.09);
    color: #ffd4af;
}

.dark-mode .dw-cid-field,
#digix-chat-window.dark-mode .dw-cid-field,
body:not(.light-mode) .chat-app .dw-cid-field {
    color: #e5e7eb;
}

.dark-mode .dw-cid-field input,
.dark-mode .dw-cid-field textarea,
#digix-chat-window.dark-mode .dw-cid-field input,
#digix-chat-window.dark-mode .dw-cid-field textarea,
body:not(.light-mode) .chat-app .dw-cid-field input,
body:not(.light-mode) .chat-app .dw-cid-field textarea {
    border-color: rgba(255, 255, 255, 0.12);
    background: #15151a;
    color: #f8fafc;
}

.dark-mode .dw-cid-upload,
#digix-chat-window.dark-mode .dw-cid-upload,
body:not(.light-mode) .chat-app .dw-cid-upload {
    border-color: rgba(255, 160, 89, 0.35);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.08), rgba(139, 92, 246, 0.1));
}

.dark-mode .dw-cid-upload-copy strong,
#digix-chat-window.dark-mode .dw-cid-upload-copy strong,
body:not(.light-mode) .chat-app .dw-cid-upload-copy strong,
.dark-mode .dw-cid-result strong,
#digix-chat-window.dark-mode .dw-cid-result strong,
body:not(.light-mode) .chat-app .dw-cid-result strong {
    color: #f8fafc;
}

.dark-mode .dw-cid-status,
#digix-chat-window.dark-mode .dw-cid-status,
body:not(.light-mode) .chat-app .dw-cid-status {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.dark-mode .dw-cid-status.working,
#digix-chat-window.dark-mode .dw-cid-status.working,
body:not(.light-mode) .chat-app .dw-cid-status.working {
    background: rgba(194, 65, 12, 0.18);
    color: #fed7aa;
}

.dark-mode .dw-cid-status.success,
#digix-chat-window.dark-mode .dw-cid-status.success,
body:not(.light-mode) .chat-app .dw-cid-status.success {
    background: rgba(6, 95, 70, 0.22);
    color: #a7f3d0;
}

.dark-mode .dw-cid-status.error,
#digix-chat-window.dark-mode .dw-cid-status.error,
body:not(.light-mode) .chat-app .dw-cid-status.error {
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
}

.dark-mode .dw-cid-result.success,
#digix-chat-window.dark-mode .dw-cid-result.success,
body:not(.light-mode) .chat-app .dw-cid-result.success {
    border-color: rgba(52, 211, 153, 0.18);
    background: linear-gradient(145deg, rgba(6, 78, 59, 0.25), rgba(30, 58, 138, 0.17));
}

.dark-mode .dw-cid-result.error,
#digix-chat-window.dark-mode .dw-cid-result.error,
body:not(.light-mode) .chat-app .dw-cid-result.error {
    border-color: rgba(248, 113, 113, 0.15);
    background: rgba(127, 29, 29, 0.18);
}

.dark-mode .dw-cid-value,
#digix-chat-window.dark-mode .dw-cid-value,
body:not(.light-mode) .chat-app .dw-cid-value {
    border-color: rgba(52, 211, 153, 0.16);
    background: rgba(0, 0, 0, 0.22);
    color: #a7f3d0;
}

@keyframes dw-cid-status-pulse {
    0%,
    100% {
        opacity: 0.72;
    }
    50% {
        opacity: 1;
    }
}

@keyframes dw-cid-result-in {
    from {
        opacity: 0;
        transform: translateY(7px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 480px) {
    .dw-cid-helper-card.page {
        width: calc(100% - 46px);
    }

    .dw-cid-tabs button {
        font-size: 9px;
    }

    .dw-cid-upload {
        min-height: 66px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dw-cid-status.working,
    .dw-cid-result {
        animation: none;
    }

    .dw-cid-upload,
    .dw-cid-tabs button {
        transition: none;
    }
}

/* Secure general screenshot troubleshooting */
.dw-screenshot-helper-card.page {
    width: min(92%, 520px);
}

.dw-screenshot-privacy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0 12px;
    padding: 10px 11px;
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 12px;
    background: rgba(239, 246, 255, 0.88);
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 680;
    line-height: 1.45;
}

.dw-screenshot-field {
    display: grid;
    gap: 6px;
    color: #344054;
    font-size: 10px;
    font-weight: 800;
}

.dw-screenshot-field select {
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    padding: 8px 34px 8px 11px;
    border: 1px solid #d8dee8;
    border-radius: 11px;
    background: #fff;
    color: #111827;
    font: 650 11px/1 Inter, sans-serif;
}

.dw-screenshot-field select:focus {
    border-color: #ff6b00;
    outline: 3px solid rgba(255, 107, 0, 0.1);
}

.dw-screenshot-picker {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 68px;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 12px;
    border: 1px dashed rgba(59, 130, 246, 0.38);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(250, 245, 255, 0.9));
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dw-screenshot-picker:hover,
.dw-screenshot-picker:focus-within {
    border-color: #ff6b00;
    box-shadow: 0 8px 22px rgba(255, 107, 0, 0.1);
    transform: translateY(-1px);
}

.dw-screenshot-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.dw-screenshot-picker-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #8b5cf6);
    color: #fff;
    font-size: 21px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.dw-screenshot-picker-copy {
    display: grid;
    gap: 3px;
}

.dw-screenshot-picker-copy strong {
    color: #1f2937;
    font-size: 11px;
}

.dw-screenshot-picker-copy small {
    color: #94a3b8;
    font-size: 9px;
}

.dw-screenshot-preview {
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 13px;
    background: #f8fafc;
}

.dw-screenshot-preview[hidden] {
    display: none;
}

.dw-screenshot-preview img {
    display: block;
    width: 100%;
    max-height: 210px;
    object-fit: contain;
    background: #0f172a;
}

.dw-screenshot-preview span {
    display: block;
    overflow: hidden;
    padding: 8px 10px;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-screenshot-confirm {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    color: #64748b;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
    cursor: pointer;
}

.dw-screenshot-confirm input {
    width: 15px;
    height: 15px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #ff6b00;
}

.dw-screenshot-status {
    margin-top: 9px;
    padding: 9px 10px;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.dw-screenshot-status[hidden] {
    display: none;
}

.dw-screenshot-status.working {
    background: #fff7ed;
    color: #c2410c;
}

.dw-screenshot-status.error {
    background: #fef2f2;
    color: #b91c1c;
}

.dw-screenshot-submit {
    width: 100%;
    min-height: 41px;
    margin-top: 9px;
}

.dw-screenshot-submit:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.dw-screenshot-helper-card.upload-complete {
    display: grid;
    justify-items: center;
    padding-top: 22px;
    padding-bottom: 22px;
    text-align: center;
}

.dw-screenshot-success-icon {
    display: grid;
    width: 43px;
    height: 43px;
    margin-bottom: 9px;
    place-items: center;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.13);
    color: #059669;
    font-size: 20px;
    font-weight: 900;
}

.dark-mode .dw-screenshot-privacy,
#digix-chat-window.dark-mode .dw-screenshot-privacy,
body:not(.light-mode) .chat-app .dw-screenshot-privacy {
    border-color: rgba(96, 165, 250, 0.18);
    background: rgba(30, 64, 175, 0.18);
    color: #bfdbfe;
}

.dark-mode .dw-screenshot-field,
#digix-chat-window.dark-mode .dw-screenshot-field,
body:not(.light-mode) .chat-app .dw-screenshot-field {
    color: #e5e7eb;
}

.dark-mode .dw-screenshot-field select,
#digix-chat-window.dark-mode .dw-screenshot-field select,
body:not(.light-mode) .chat-app .dw-screenshot-field select {
    border-color: rgba(255, 255, 255, 0.12);
    background: #15151a;
    color: #f8fafc;
}

.dark-mode .dw-screenshot-picker,
#digix-chat-window.dark-mode .dw-screenshot-picker,
body:not(.light-mode) .chat-app .dw-screenshot-picker {
    border-color: rgba(96, 165, 250, 0.28);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
}

.dark-mode .dw-screenshot-picker-copy strong,
#digix-chat-window.dark-mode .dw-screenshot-picker-copy strong,
body:not(.light-mode) .chat-app .dw-screenshot-picker-copy strong {
    color: #f8fafc;
}

.dark-mode .dw-screenshot-preview,
#digix-chat-window.dark-mode .dw-screenshot-preview,
body:not(.light-mode) .chat-app .dw-screenshot-preview {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
}

.dark-mode .dw-screenshot-status,
#digix-chat-window.dark-mode .dw-screenshot-status,
body:not(.light-mode) .chat-app .dw-screenshot-status {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.dark-mode .dw-screenshot-status.working,
#digix-chat-window.dark-mode .dw-screenshot-status.working,
body:not(.light-mode) .chat-app .dw-screenshot-status.working {
    background: rgba(194, 65, 12, 0.18);
    color: #fed7aa;
}

.dark-mode .dw-screenshot-status.error,
#digix-chat-window.dark-mode .dw-screenshot-status.error,
body:not(.light-mode) .chat-app .dw-screenshot-status.error {
    background: rgba(127, 29, 29, 0.2);
    color: #fecaca;
}

@media (max-width: 480px) {
    #digix-chat-window .dw-chat-quick-action:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .dw-screenshot-helper-card.page {
        width: calc(100% - 46px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dw-screenshot-picker,
    .dw-screenshot-submit,
    .dw-screenshot-success-icon {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* 2026 premium buyer-help system */
#messages > *,
#digix-chat-messages > * {
    flex-shrink: 0;
}

.dw-self-service-card {
    position: relative;
    flex: 0 0 auto;
    overflow: hidden;
    border-color: rgba(255, 107, 0, 0.16);
    border-radius: 20px 20px 20px 7px;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 107, 0, 0.09), transparent 34%),
        #fff;
    box-shadow:
        0 18px 44px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dw-self-service-card::after {
    position: absolute;
    top: 0;
    left: 18px;
    width: 74px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, #ff6b00, #9b5cff, transparent);
    content: "";
}

.dw-self-service-card.page,
.dw-cid-helper-card.page,
.dw-screenshot-helper-card.page {
    width: min(calc(100% - 58px), 660px);
    max-width: 660px;
    margin-left: 46px;
}

.dw-self-service-card-head {
    min-height: 38px;
    margin-bottom: 10px;
}

.dw-self-service-card-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.dw-self-service-card-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid rgba(255, 107, 0, 0.13);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.15), rgba(139, 92, 246, 0.09));
    color: #e85b00;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.dw-self-service-card-head strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dw-self-service-card.widget .dw-self-service-card-head {
    align-items: flex-start;
}

.dw-self-service-card.widget .dw-self-service-card-title {
    flex: 1 1 auto;
}

.dw-self-service-card.widget .dw-self-service-card-head strong {
    overflow: visible;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
}

.dw-self-service-card.widget .dw-self-service-card-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
}

.dw-self-service-card.widget .dw-self-service-badge {
    max-width: 84px;
    padding: 4px 6px;
    font-size: 8px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

.dw-self-service-badge {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 107, 0, 0.11);
    background: rgba(255, 107, 0, 0.08);
    letter-spacing: 0.035em;
}

.dw-chat-quick-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.dw-chat-quick-action-icon {
    display: inline-grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 107, 0, 0.09);
    color: #e85b00;
    font-size: 10px;
    transition: transform 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.dw-chat-quick-action:hover .dw-chat-quick-action-icon,
.dw-chat-quick-action:focus-visible .dw-chat-quick-action-icon {
    background: linear-gradient(135deg, #ff6b00, #ff8a00);
    color: #fff;
    transform: translateY(-1px) scale(1.04);
}

.dw-chat-quick-action-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dw-screenshot-picker.is-dragging {
    border-color: #ff6b00;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.14), rgba(139, 92, 246, 0.12));
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.08);
    transform: translateY(-1px);
}

.dw-screenshot-status.working::before {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    vertical-align: -2px;
    animation: dwScreenshotSpin 0.7s linear infinite;
}

.screenshot-upload-status {
    opacity: 0.92;
}

.screenshot-upload-status .dw-screenshot-upload-progress,
.screenshot-upload-status.message.user {
    border: 1px solid rgba(255, 107, 0, 0.18);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.1), rgba(255, 138, 0, 0.05));
    box-shadow: 0 10px 26px rgba(45, 30, 18, 0.08);
}

.dw-screenshot-upload-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    font-size: 12px;
    font-weight: 700;
}

.dw-screenshot-upload-copy::before {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border: 2px solid #ff6b00;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: dwScreenshotSpin 0.7s linear infinite;
}

.screenshot-upload-status[data-state="error"] .dw-screenshot-upload-copy {
    color: #c73328;
}

.screenshot-upload-status[data-state="error"] .dw-screenshot-upload-copy::before {
    border: 0;
    color: #d63b30;
    content: "!";
    animation: none;
    font-size: 13px;
    line-height: 11px;
    text-align: center;
}

.screenshot-message {
    width: min(82%, 300px);
    max-width: 300px;
    padding: 7px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.42);
}

.dw-chat-screenshot-message-image {
    display: block;
    width: 100%;
    max-height: 230px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    object-fit: contain;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.07);
}

.dw-chat-screenshot-message-copy {
    display: block;
    padding: 8px 7px 3px;
    overflow: hidden;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screenshot-message.preview-unavailable .dw-chat-screenshot-message-copy::after {
    display: block;
    margin-top: 3px;
    content: "Preview is still processing";
    font-size: 9px;
    font-weight: 600;
    opacity: 0.82;
}

#digix-chat-messages .message.agent,
#digix-chat-messages .message.admin,
#digix-chat-messages .premium-agent-message {
    align-self: flex-start;
    width: fit-content;
    max-width: min(82%, 360px);
    min-width: 0;
    margin-left: 32px;
    padding: 10px 14px 9px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 120, 32, 0.22);
    border-radius: 18px 18px 18px 6px;
    background: #fff !important;
    color: #202b3c !important;
    box-shadow: 0 5px 16px rgba(55, 35, 20, 0.08) !important;
    font-weight: 500;
    letter-spacing: 0;
}

#digix-chat-messages .dw-agent-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 4px;
    padding: 0;
    line-height: 1.2;
}

#digix-chat-messages .dw-agent-message-identity {
    overflow: hidden;
    color: #b94700;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#digix-chat-messages .dw-agent-message-verified {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #047857;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

#digix-chat-messages .premium-agent-message > .message-content {
    display: block;
    min-width: 0;
    color: #202b3c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: normal;
}

#digix-chat-messages .premium-agent-message > .message-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
    color: #7b8798;
    font-size: 10px;
    font-weight: 650;
}

#digix-chat-messages .premium-agent-message::after {
    position: absolute;
    top: 8px;
    left: -30px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 8px;
    background: linear-gradient(145deg, #ff5a00, #ff9b28);
    box-shadow: 0 7px 18px rgba(255, 96, 0, 0.28);
    color: #fff;
    content: "D";
    font-size: 11px;
    font-weight: 900;
}

#digix-chat-messages .premium-agent-message:focus-visible {
    outline: 3px solid rgba(255, 107, 0, 0.3);
    outline-offset: 3px;
}

#digix-chat-window.dark-mode #digix-chat-messages .premium-agent-message {
    border-color: rgba(255, 154, 82, 0.26);
    background:
        radial-gradient(circle at 100% 0, rgba(255, 107, 0, 0.14), transparent 44%),
        linear-gradient(145deg, #292a31, #202127) !important;
    color: #f8fafc !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.05) !important;
}

/* Reactions remain available in message data, but never interrupt the
   conversation with a hover toolbar. */
#digix-chat-window .reaction-picker {
    display: none !important;
}

#digix-chat-window.dark-mode #digix-chat-messages .dw-agent-message-header {
    border-bottom-color: rgba(255, 171, 107, 0.16);
}

#digix-chat-window.dark-mode #digix-chat-messages .dw-agent-message-identity {
    color: #ffb06f;
}

#digix-chat-window.dark-mode #digix-chat-messages .premium-agent-message > .message-content {
    color: #f8fafc;
}

#digix-chat-window.dark-mode #digix-chat-messages .dw-agent-message-verified {
    border-color: rgba(52, 211, 153, 0.18);
    background: rgba(6, 78, 59, 0.32);
    color: #6ee7b7;
}

.dark-mode .dw-self-service-card,
#digix-chat-window.dark-mode .dw-self-service-card,
body:not(.light-mode) .chat-app .dw-self-service-card {
    border-color: rgba(255, 160, 89, 0.2);
    background:
        radial-gradient(circle at 100% 0, rgba(255, 107, 0, 0.12), transparent 36%),
        linear-gradient(145deg, rgba(35, 36, 45, 0.98), rgba(23, 24, 31, 0.98));
    box-shadow:
        0 18px 46px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.dark-mode .dw-self-service-card-icon,
#digix-chat-window.dark-mode .dw-self-service-card-icon,
body:not(.light-mode) .chat-app .dw-self-service-card-icon {
    border-color: rgba(255, 160, 89, 0.18);
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.17), rgba(139, 92, 246, 0.12));
    color: #ffb273;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

@media (max-width: 480px) {
    .dw-self-service-card.page,
    .dw-cid-helper-card.page,
    .dw-screenshot-helper-card.page {
        width: calc(100% - 43px);
        margin-left: 39px;
    }
}

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

/* On phones, keep shortcuts in one compact, swipeable rail so the message
   timeline and composer retain the majority of the viewport. Desktop keeps
   its full multi-column shortcut grid. */
@media (max-width: 767px) {
    #digix-chat-window #digix-self-service-actions.dw-chat-quick-actions {
        display: flex;
        flex-wrap: nowrap;
        grid-template-columns: none;
        gap: 8px;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 9px 12px 10px;
        justify-content: flex-start;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    #digix-chat-window #digix-self-service-actions.dw-chat-quick-actions::-webkit-scrollbar {
        display: none;
    }

    #digix-chat-window #digix-self-service-actions .dw-chat-quick-action,
    #digix-chat-window #digix-self-service-actions .dw-chat-quick-action:last-child:nth-child(3n + 1) {
        flex: 0 0 auto;
        width: auto;
        min-width: max-content;
        min-height: 38px;
        padding: 8px 13px;
        white-space: nowrap;
        grid-column: auto;
    }

    /* Screenshot help remains available from the activation helper, but is
       omitted from the primary rail so the six high-frequency shortcuts stay
       immediately scannable on narrow screens. */
    #digix-chat-window #digix-self-service-actions .dw-chat-quick-action[data-action="screenshot"] {
        display: none;
    }
}

/* Premium horizontal commerce cards — shared by the widget and full-page chat. */
#digix-chat-window .card-message,
#digix-chat-widget #digix-chat-window #digix-chat-messages .message.bot.card-message {
    width: min(96%, 560px);
    max-width: 560px;
    box-sizing: border-box;
    padding: 0 !important;
    overflow: visible;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
}

#digix-chat-widget #digix-chat-window #digix-chat-messages .message.bot.card-message {
    width: min(calc(100% - 2px), 390px);
    max-width: 390px;
}

#digix-chat-window .card-message > .message-meta {
    display: none;
}

#digix-chat-window .dw-chat-commerce-card {
    position: relative;
    display: grid;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    grid-template-columns: clamp(122px, 29%, 154px) minmax(0, 1fr);
    min-height: 166px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.09);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(255, 122, 18, 0.1), transparent 38%),
        linear-gradient(145deg, #ffffff 0%, #fcfcfd 100%);
    box-shadow:
        0 18px 46px rgba(15, 23, 42, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 #fff;
    isolation: isolate;
    transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

@media (hover: hover) {
    #digix-chat-window .dw-chat-commerce-card:hover {
        border-color: rgba(255, 106, 0, 0.2);
        box-shadow:
            0 22px 54px rgba(15, 23, 42, 0.16),
            0 6px 18px rgba(255, 106, 0, 0.08),
            inset 0 1px 0 #fff;
        transform: translateY(-2px);
    }
}

#digix-chat-window .dw-chat-product-media {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 166px;
    place-items: center;
    padding: 18px 14px 34px;
    overflow: hidden;
    border-right: 1px solid rgba(15, 23, 42, 0.07);
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.94), transparent 29%),
        linear-gradient(145deg, #fff7ed, #f8fafc 68%);
}

#digix-chat-window .dw-chat-product-media::before {
    position: absolute;
    width: 116px;
    height: 116px;
    border: 1px solid rgba(255, 106, 0, 0.08);
    border-radius: 50%;
    content: "";
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 12px 34px rgba(255, 106, 0, 0.09);
}

#digix-chat-window .dw-chat-product-media .digix-card-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 104px;
    object-fit: contain;
    background: transparent;
    filter: drop-shadow(0 10px 15px rgba(15, 23, 42, 0.16));
    transition: transform 260ms ease;
}

@media (hover: hover) {
    #digix-chat-window .dw-chat-commerce-card:hover .digix-card-image {
        transform: scale(1.035);
    }
}

#digix-chat-window .dw-chat-product-media .dw-chat-product-image-fallback {
    width: 64px;
    height: 64px;
    opacity: 0.78;
    filter: none;
}

#digix-chat-window .dw-chat-product-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 2;
    overflow: hidden;
    padding: 5px 7px;
    border: 1px solid rgba(255, 106, 0, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #c2410c;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.045em;
    line-height: 1.1;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(10px);
}

#digix-chat-window .dw-chat-commerce-card .digix-card-body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 16px 17px 14px;
}

#digix-chat-window .dw-chat-product-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    color: #d75b0a;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

#digix-chat-window .dw-chat-product-meta i {
    flex: 0 0 auto;
    font-size: 8px;
}

#digix-chat-window .dw-chat-product-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#digix-chat-window .dw-chat-commerce-card .digix-card-body h4 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 6px;
    color: #172033;
    font: 800 clamp(13px, 1.9vw, 15px)/1.28 Inter, sans-serif;
    letter-spacing: -0.025em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#digix-chat-window .dw-chat-commerce-card .card-desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #667085;
    font: 500 10px/1.45 Inter, sans-serif;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#digix-chat-window .dw-chat-product-footer {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 11px;
}

#digix-chat-window .dw-chat-product-price {
    display: grid;
    min-width: 0;
    gap: 1px;
}

#digix-chat-window .dw-chat-product-price small {
    color: #98a2b3;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}

#digix-chat-window .dw-chat-product-price strong {
    overflow: hidden;
    color: #e85b00;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#digix-chat-window .dw-chat-product-assurance {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 5px;
    color: #667085;
    font-size: 9px;
    font-weight: 750;
}

#digix-chat-window .dw-chat-product-assurance i {
    color: #16a06d;
    font-size: 8px;
}

#digix-chat-window .dw-chat-commerce-card .digix-card-btn {
    display: inline-flex;
    width: auto;
    min-width: 0;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    margin: 0;
    padding: 9px 11px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6500, #ff8b22);
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 9px 20px rgba(255, 106, 0, 0.24);
}

#digix-chat-window .dw-chat-commerce-card .digix-card-btn i {
    font-size: 8px;
    transition: transform 180ms ease;
}

@media (hover: hover) {
    #digix-chat-window .dw-chat-commerce-card .digix-card-btn:hover i {
        transform: translateX(2px);
    }
}

/* Premium horizontal order and delivery cards. */
#digix-chat-window .dw-order-summary-card {
    width: min(94%, 680px);
    max-width: 680px;
}

#digix-chat-widget #digix-chat-window .dw-order-summary-card {
    width: min(96%, 390px);
    max-width: 390px;
}

#digix-chat-window .dw-self-service-orders,
#digix-chat-window .dw-delivery-list {
    gap: 9px;
    margin: 12px 0 2px;
}

#digix-chat-window .dw-order-horizontal-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: stretch;
    gap: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, #f8fafc);
    box-shadow: 0 9px 24px rgba(15, 23, 42, 0.07);
}

#digix-chat-window .dw-order-card-media {
    display: grid;
    min-height: 76px;
    place-items: center;
    border-right: 1px solid rgba(255, 106, 0, 0.09);
    background: linear-gradient(145deg, #fff7ed, #ffedd5);
    color: #e85b00;
    font-size: 17px;
}

#digix-chat-window .dw-order-card-media i {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(255, 106, 0, 0.13);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 7px 16px rgba(255, 106, 0, 0.09);
}

#digix-chat-window .dw-delivery-item.state-ready .dw-order-card-media {
    border-right-color: rgba(22, 160, 109, 0.12);
    background: linear-gradient(145deg, #ecfdf5, #d1fae5);
    color: #07845a;
}

#digix-chat-window .dw-order-card-content {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 10px 11px;
}

#digix-chat-window .dw-order-card-top {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#digix-chat-window .dw-order-card-top > strong {
    overflow: hidden;
    color: #1d2939;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#digix-chat-window .dw-order-card-product,
#digix-chat-window .dw-delivery-product {
    display: block;
    max-width: none;
    overflow: hidden;
    color: #475467;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#digix-chat-window .dw-order-card-facts {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#digix-chat-window .dw-order-card-facts small {
    color: #98a2b3;
    font-size: 9px;
}

#digix-chat-window .dw-order-card-total {
    overflow: hidden;
    color: #e85b00;
    font-size: 10px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#digix-chat-window .dw-order-horizontal-card .dw-self-service-order-status,
#digix-chat-window .dw-order-horizontal-card .dw-delivery-state {
    padding: 4px 7px;
    font-size: 8px;
    letter-spacing: 0.025em;
}

#digix-chat-window .dw-delivery-item .dw-delivery-detail {
    margin: 1px 0;
    color: #667085;
    font-size: 9px;
    line-height: 1.42;
}

#digix-chat-window .dw-order-horizontal-card .dw-delivery-meta,
#digix-chat-window .dw-order-horizontal-card .dw-delivery-resend-note {
    font-size: 8px;
    line-height: 1.4;
}

#digix-chat-window .dw-order-horizontal-card .dw-self-service-card-actions {
    gap: 6px;
    margin-top: 4px;
}

#digix-chat-window .dw-order-horizontal-card .dw-self-service-link {
    min-height: 30px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: 9px;
}

/* Dark treatment keeps the same hierarchy without losing commerce details. */
#digix-chat-window.dark-mode .dw-chat-commerce-card,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-commerce-card {
    border-color: rgba(255, 160, 89, 0.19);
    background:
        radial-gradient(circle at 100% 0, rgba(255, 106, 0, 0.13), transparent 39%),
        linear-gradient(145deg, #252731, #181a22) !important;
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#digix-chat-window.dark-mode .dw-chat-product-media,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-product-media {
    border-right-color: rgba(255, 255, 255, 0.07);
    background:
        radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.07), transparent 29%),
        linear-gradient(145deg, #30261f, #20222b 68%);
}

#digix-chat-window.dark-mode .dw-chat-product-media::before,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-product-media::before {
    border-color: rgba(255, 160, 89, 0.1);
    background: rgba(255, 255, 255, 0.035);
}

#digix-chat-window.dark-mode .dw-chat-product-badge,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-product-badge {
    border-color: rgba(255, 160, 89, 0.19);
    background: rgba(28, 29, 37, 0.88);
    color: #ffb77a;
}

#digix-chat-window.dark-mode .dw-chat-commerce-card .digix-card-body h4,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-commerce-card .digix-card-body h4,
#digix-chat-window.dark-mode .dw-order-card-top > strong,
body:not(.light-mode) #digix-chat-window.chat-app .dw-order-card-top > strong {
    color: #f5f7fb;
}

#digix-chat-window.dark-mode .dw-chat-commerce-card .card-desc,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-commerce-card .card-desc {
    color: #aeb6c5;
}

#digix-chat-window.dark-mode .dw-order-horizontal-card,
body:not(.light-mode) #digix-chat-window.chat-app .dw-order-horizontal-card {
    border-color: rgba(255, 255, 255, 0.075);
    background: linear-gradient(145deg, #272933, #1c1e26);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
}

#digix-chat-window.dark-mode .dw-order-card-media,
body:not(.light-mode) #digix-chat-window.chat-app .dw-order-card-media {
    border-right-color: rgba(255, 160, 89, 0.12);
    background: linear-gradient(145deg, #35291f, #29241f);
    color: #ffad67;
}

#digix-chat-window.dark-mode .dw-order-card-media i,
body:not(.light-mode) #digix-chat-window.chat-app .dw-order-card-media i {
    border-color: rgba(255, 160, 89, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

#digix-chat-window.dark-mode .dw-order-card-product,
#digix-chat-window.dark-mode .dw-delivery-product,
body:not(.light-mode) #digix-chat-window.chat-app .dw-order-card-product,
body:not(.light-mode) #digix-chat-window.chat-app .dw-delivery-product {
    color: #c5cbd5;
}

@media (max-width: 420px) {
    #digix-chat-window .dw-chat-commerce-card {
        grid-template-columns: 108px minmax(0, 1fr);
        min-height: 154px;
        border-radius: 17px;
    }

    #digix-chat-window .dw-chat-product-media {
        min-height: 154px;
        padding: 16px 10px 32px;
    }

    #digix-chat-window .dw-chat-product-media::before {
        width: 88px;
        height: 88px;
    }

    #digix-chat-window .dw-chat-product-media .digix-card-image {
        height: 86px;
    }

    #digix-chat-window .dw-chat-product-badge {
        font-size: 7px;
        letter-spacing: 0.02em;
    }

    #digix-chat-window .dw-chat-commerce-card .digix-card-body {
        padding: 13px 12px 11px;
    }

    #digix-chat-window .dw-chat-commerce-card .card-desc {
        -webkit-line-clamp: 1;
    }

    #digix-chat-window .dw-chat-product-footer {
        gap: 6px;
        padding-top: 8px;
    }

    #digix-chat-window .dw-chat-product-price strong {
        font-size: 13px;
    }

    #digix-chat-window .dw-chat-commerce-card .digix-card-btn {
        min-height: 32px;
        padding: 8px 9px;
        font-size: 9px;
    }
}

/* Premium human-support handoff: compact, readable and unmistakably WhatsApp. */
#digix-chat-window .dw-chat-support-card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 176px;
    border-color: rgba(22, 163, 74, 0.2);
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.13), transparent 42%),
        linear-gradient(145deg, #ffffff, #f7fff9);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14), 0 8px 24px rgba(22, 163, 74, 0.08);
}

#digix-chat-window .dw-chat-support-card .dw-chat-product-media {
    min-height: 176px;
    padding: 24px 16px 38px;
    border-right-color: rgba(22, 163, 74, 0.13);
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.96), transparent 34%),
        linear-gradient(155deg, #ecfdf3, #dcfce7);
}

#digix-chat-window .dw-chat-support-card .dw-chat-product-media::before {
    width: 78px;
    height: 78px;
    border-color: rgba(22, 163, 74, 0.16);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 14px 32px rgba(22, 163, 74, 0.13);
}

#digix-chat-window .dw-chat-support-card .dw-chat-product-media .digix-card-image {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 9px 13px rgba(15, 23, 42, 0.12));
}

#digix-chat-window .dw-chat-support-card .dw-chat-product-badge {
    border-color: rgba(22, 163, 74, 0.2);
    background: rgba(255, 255, 255, 0.94);
    color: #15803d;
}

#digix-chat-window .dw-chat-support-card .dw-chat-product-meta,
#digix-chat-window .dw-chat-support-card .dw-chat-product-assurance,
#digix-chat-window .dw-chat-support-card .dw-chat-product-assurance i {
    color: #15803d;
}

#digix-chat-window .dw-chat-support-card .digix-card-body h4 {
    font-size: 15px;
    -webkit-line-clamp: 2;
}

#digix-chat-window .dw-chat-support-card .card-desc {
    font-size: 10.5px;
    line-height: 1.5;
    -webkit-line-clamp: 3;
}

#digix-chat-window .dw-chat-support-card .digix-card-btn {
    min-height: 38px;
    padding: 10px 13px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}

#digix-chat-window.dark-mode .dw-chat-support-card,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-support-card {
    border-color: rgba(74, 222, 128, 0.2);
    background:
        radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.13), transparent 42%),
        linear-gradient(145deg, #1d2923, #171f1b) !important;
}

#digix-chat-window.dark-mode .dw-chat-support-card .dw-chat-product-media,
body:not(.light-mode) #digix-chat-window.chat-app .dw-chat-support-card .dw-chat-product-media {
    border-color: rgba(74, 222, 128, 0.15);
    background: linear-gradient(145deg, #203b2b, #1b2921);
}

@media (max-width: 420px) {
    #digix-chat-window .dw-chat-support-card {
        grid-template-columns: 88px minmax(0, 1fr);
        min-height: 166px;
    }

    #digix-chat-window .dw-chat-support-card .dw-chat-product-media {
        min-height: 166px;
        padding-right: 10px;
        padding-left: 10px;
    }

    #digix-chat-window .dw-chat-support-card .card-desc {
        -webkit-line-clamp: 3;
    }

    #digix-chat-window .dw-chat-support-card .dw-chat-product-assurance {
        display: none;
    }
}

@media (max-width: 340px) {
    #digix-chat-window .dw-chat-commerce-card {
        grid-template-columns: 94px minmax(0, 1fr);
    }

    #digix-chat-window .dw-chat-product-price small,
    #digix-chat-window .dw-chat-product-assurance {
        display: none;
    }

    #digix-chat-window .dw-order-horizontal-card {
        grid-template-columns: 46px minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    #digix-chat-window .dw-chat-commerce-card,
    #digix-chat-window .dw-chat-commerce-card .digix-card-image,
    #digix-chat-window .dw-chat-commerce-card .digix-card-btn i {
        transition: none;
    }
}

/* ============================================================
 * Complete dark-surface pass for dynamically injected buyer tools.
 *
 * The floating widget owns its theme on #digix-chat-window.dark-mode,
 * while the full-page experience is dark unless body.light-mode exists.
 * Keep every selector rooted in one of those states so light mode remains
 * byte-for-byte governed by the premium light palette above.
 * ============================================================ */
:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app) {
    --dw-chat-night-panel: #20222b;
    --dw-chat-night-panel-raised: #292b35;
    --dw-chat-night-field: #14161d;
    --dw-chat-night-border: rgba(255, 255, 255, 0.11);
    --dw-chat-night-text: #f5f7fb;
    --dw-chat-night-muted: #aeb7c6;
    --dw-chat-night-faint: #8994a6;
}

/* Shortcuts never flash white on hover or during the sheen animation. */
:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    #digix-self-service-actions .dw-chat-quick-action::after {
    background: linear-gradient(120deg, transparent 30%, rgba(255, 183, 122, 0.14), transparent 70%);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    #digix-self-service-actions .dw-chat-quick-action:hover,
:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    #digix-self-service-actions .dw-chat-quick-action:focus-visible {
    border-color: rgba(255, 139, 46, 0.48) !important;
    background: linear-gradient(160deg, rgba(255, 138, 46, 0.16), rgba(255, 255, 255, 0.055)) !important;
    color: #ffd0aa !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 0 3px rgba(255, 106, 0, 0.08) !important;
}

/* Widget composer, attachment control and resolved composer. The 16px input
   declaration earlier in this file intentionally remains the size authority. */
#digix-chat-window.dark-mode .chat-form,
#digix-chat-window.dark-mode.conversation-resolved .chat-form {
    border-top-color: var(--dw-chat-night-border);
    background: rgba(16, 18, 24, 0.97);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#digix-chat-window.dark-mode #digix-attach-button {
    border-color: rgba(255, 145, 64, 0.25) !important;
    background: rgba(255, 106, 0, 0.1) !important;
    color: #ffb273 !important;
}

#digix-chat-window.dark-mode #digix-attach-button:hover,
#digix-chat-window.dark-mode #digix-attach-button:focus-visible {
    border-color: rgba(255, 145, 64, 0.5) !important;
    background: rgba(255, 106, 0, 0.18) !important;
    outline: 3px solid rgba(255, 106, 0, 0.11);
    outline-offset: 2px;
}

#digix-chat-window.dark-mode #digix-chat-input {
    border-color: var(--dw-chat-night-border);
    background: var(--dw-chat-night-field);
    color: var(--dw-chat-night-text);
    caret-color: #ff8b2e;
    color-scheme: dark;
}

#digix-chat-window.dark-mode #digix-chat-input::placeholder {
    color: #7f8a9d;
}

#digix-chat-window.dark-mode #digix-chat-input:focus {
    border-color: rgba(255, 139, 46, 0.56);
    background: #111319;
    box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.11);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-resolved-composer {
    border-color: rgba(52, 211, 153, 0.2);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.28), rgba(25, 27, 35, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-resolved-composer-icon {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
}

/* Offline state, drag overlay, loading/error/empty notices and attachments. */
#digix-chat-window.dark-mode .status-badge[data-online="false"] {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(120, 74, 8, 0.2);
    color: #fcd38d;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app).dw-chat-drag-active::after {
    border-color: rgba(255, 151, 76, 0.64);
    background: rgba(17, 19, 26, 0.95);
    color: #ffc08a;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-self-service-loading, .dw-self-service-empty, .dw-self-service-error, .empty-state, .message.bot.is-loading) {
    border: 1px solid var(--dw-chat-night-border);
    background: rgba(255, 255, 255, 0.045) !important;
    color: var(--dw-chat-night-muted) !important;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-self-service-error, .message.error) {
    border-color: rgba(248, 113, 113, 0.2);
    background: rgba(127, 29, 29, 0.2) !important;
    color: #fecaca !important;
}

#digix-chat-window.dark-mode :is(.message-file, .file-info) {
    border-color: var(--dw-chat-night-border);
    background: rgba(255, 255, 255, 0.055);
    color: var(--dw-chat-night-text);
}

#digix-chat-window.dark-mode :is(.file-name, .file-size) {
    color: inherit;
}

#digix-chat-window.dark-mode .dw-chat-screenshot-message-image {
    background: #15171e;
    box-shadow: inset 0 0 0 1px var(--dw-chat-night-border);
}

/* Every dynamically generated card row and secondary action uses a raised
   night surface; semantic statuses keep their color without pastel patches. */
:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-self-service-link:not(.primary) {
    border-color: rgba(255, 145, 64, 0.24);
    background: rgba(255, 106, 0, 0.09);
    color: #ffc08a;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-self-service-link:not(.primary):hover,
:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-self-service-link:not(.primary):focus-visible {
    border-color: rgba(255, 145, 64, 0.5);
    background: rgba(255, 106, 0, 0.16);
    color: #ffe0c4;
    outline: 3px solid rgba(255, 106, 0, 0.09);
    outline-offset: 2px;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-self-service-badge, .dw-self-service-order-status.pending, .dw-delivery-state) {
    border-color: rgba(251, 146, 60, 0.18);
    background: rgba(194, 65, 12, 0.18);
    color: #fed7aa;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-self-service-order-status.paid, .dw-delivery-state.ready) {
    border-color: rgba(52, 211, 153, 0.18);
    background: rgba(6, 95, 70, 0.27);
    color: #a7f3d0;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-delivery-state.awaiting {
    border-color: rgba(248, 113, 113, 0.18);
    background: rgba(127, 29, 29, 0.26);
    color: #fecaca;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-delivery-state.manual {
    border-color: rgba(96, 165, 250, 0.2);
    background: rgba(30, 64, 175, 0.24);
    color: #bfdbfe;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-activation-families .dw-self-service-link.selected {
    border-color: rgba(255, 145, 64, 0.58);
    background: rgba(255, 106, 0, 0.2);
    color: #ffe0c4;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-delivery-item .dw-delivery-detail, .dw-order-card-facts small, .dw-delivery-meta) {
    color: var(--dw-chat-night-muted);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-delivery-resend-note {
    color: #fdba74;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-chat-product-price small, .dw-chat-product-assurance) {
    color: var(--dw-chat-night-muted);
}

/* CID, download, compatibility and screenshot helpers share form primitives. */
:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-activation-form input, .dw-cid-field input, .dw-cid-field textarea, .dw-screenshot-field select) {
    border-color: var(--dw-chat-night-border);
    background: var(--dw-chat-night-field);
    color: var(--dw-chat-night-text);
    color-scheme: dark;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-activation-form input, .dw-cid-field input, .dw-cid-field textarea, .dw-screenshot-field select)::placeholder {
    color: #7f8a9d;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-activation-form input, .dw-cid-field input, .dw-cid-field textarea, .dw-screenshot-field select):focus {
    border-color: rgba(255, 139, 46, 0.56);
    outline: 3px solid rgba(255, 106, 0, 0.11);
    box-shadow: none;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-activation-examples button, .dw-cid-tabs button) {
    color: var(--dw-chat-night-muted);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-cid-tabs button:hover,
:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-cid-tabs button:focus-visible {
    background: rgba(255, 106, 0, 0.1);
    color: #ffc08a;
    outline: 2px solid rgba(255, 106, 0, 0.14);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-cid-upload:hover, .dw-cid-upload:focus-within, .dw-screenshot-picker:hover, .dw-screenshot-picker:focus-within, .dw-screenshot-picker.is-dragging) {
    border-color: rgba(255, 145, 64, 0.5);
    background: linear-gradient(135deg, rgba(255, 106, 0, 0.14), rgba(139, 92, 246, 0.13));
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(255, 106, 0, 0.07);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    :is(.dw-cid-upload-copy small, .dw-cid-counter, .dw-cid-divider, .dw-cid-confirm, .dw-screenshot-picker-copy small, .dw-screenshot-preview span, .dw-screenshot-confirm) {
    color: var(--dw-chat-night-faint);
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-cid-result-eyebrow {
    color: #6ee7b7;
}

:is(#digix-chat-window.dark-mode, body:not(.light-mode) #digix-chat-window.chat-app)
    .dw-cid-secondary-actions {
    border-top-color: var(--dw-chat-night-border);
}

/* Keep every late-mounted chat control above Safari's auto-zoom threshold. */
@media (max-width: 768px) {
    #digix-chat-window :is(
        input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
        textarea,
        select
    ) {
        font-size: 16px !important;
    }
}
