/* ============================================================
 * WorkCampConnect — Chat Widget CSS
 * ============================================================
 * Every selector below is namespaced under .wcc-chat-widget so
 * nothing leaks to other components. Per CLAUDE.md ship rule 5,
 * the panel uses var(--color-surface-solid) (#0f2840 — opaque)
 * and never var(--color-surface) which is 4% transparent.
 *
 * Phase 8 step 46 (post-build skill) greps this file for any
 * non-namespaced selector — keep every rule prefixed with
 * .wcc-chat-widget, .wcc-chat-* class, or be inside @media /
 * @keyframes / [data-theme="light"] context.
 * ============================================================ */

/* ── Launcher (FAB) ──────────────────────────────────────── */
.wcc-chat-launcher {
    position: fixed;
    right: var(--space-5);
    bottom: var(--space-5);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    border: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.wcc-chat-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.wcc-chat-launcher:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}
.wcc-chat-launcher__icon {
    pointer-events: none;
}
.wcc-chat-launcher.is-open {
    transform: scale(0.92);
    opacity: 0.85;
}
.wcc-chat-launcher__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--color-red);
    color: #fff;
    font-size: 11px;
    font-weight: var(--font-weight-bold);
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg);
    pointer-events: none;
}
/* CSS author rules normally outrank the user-agent default
   `[hidden] { display: none }` at equal specificity, so we
   need an explicit override or the badge stays visible
   showing "0" before the JS sets a real unread count. */
.wcc-chat-launcher__badge[hidden] { display: none; }

/* ── Launcher status dot ────────────────────────────────────
   12px dot, 2px navy border. Top-right of the launcher.
   Three states: online (pulsing green), away (solid amber),
   offline (solid red). Hidden by default until JS reads the
   real status from the poll endpoint. */
.wcc-chat-launcher__status-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--color-bg);
    pointer-events: none;
    transition: background 0.3s ease;
    /* Hidden until status is known */
    display: none;
}
/* Show the dot once status is set */
.wcc-chat-launcher__status-dot[data-state="online"],
.wcc-chat-launcher__status-dot[data-state="away"],
.wcc-chat-launcher__status-dot[data-state="offline"] {
    display: block;
}
.wcc-chat-launcher__status-dot[data-state="online"] {
    background: var(--color-online);
    animation: wccChatStatusPulse 1.5s ease-in-out infinite;
}
.wcc-chat-launcher__status-dot[data-state="away"] {
    background: var(--color-text-warning);
    animation: none;
}
.wcc-chat-launcher__status-dot[data-state="offline"] {
    background: var(--color-red);
    animation: none;
}
@keyframes wccChatStatusPulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.55; transform: scale(0.85); }
}
/* Hide the dot when the unread badge is showing — they share corner
   real-estate; the unread count takes priority since it's a stronger
   signal that demands attention. Uses :has() (supported in all
   modern browsers since 2023). */
.wcc-chat-launcher:has(.wcc-chat-launcher__badge:not([hidden])) .wcc-chat-launcher__status-dot {
    display: none;
}

/* Proactive teaser — small bubble next to the launcher */
.wcc-chat-teaser {
    position: fixed;
    right: calc(var(--space-5) + 70px);
    bottom: var(--space-5);
    background: var(--color-surface-solid);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    max-width: 280px;
    font-size: var(--font-size-sm);
    z-index: 9997;
    animation: wccTeaserPop 0.3s ease-out;
}
@keyframes wccTeaserPop {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.wcc-chat-teaser__body {
    cursor: pointer;
    line-height: var(--line-height-normal);
}
.wcc-chat-teaser__body:hover { color: var(--color-accent); }
.wcc-chat-teaser__close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
}
.wcc-chat-teaser__close:hover { color: var(--color-text); }
@media (max-width: 480px) {
    .wcc-chat-teaser {
        right: var(--space-4);
        bottom: calc(var(--space-4) + 56px + var(--space-2));
        left: var(--space-3);
        max-width: none;
    }
}
[data-theme="light"] .wcc-chat-teaser {
    background: #ffffff;
    color: #1A2B3C;
    border-color: rgba(18, 57, 79, 0.12);
}

/* Hide the launcher on the dedicated /help/ page so we don't
   stack two Trail Guide surfaces on top of each other. */
body.page-help-center .wcc-chat-launcher,
body.page-help-center .wcc-chat-panel {
    display: none !important;
}

/* ── Expanded panel ──────────────────────────────────────── */
.wcc-chat-panel {
    position: fixed;
    right: var(--space-5);
    bottom: calc(var(--space-5) + 56px + var(--space-3));
    width: 380px;
    max-width: calc(100vw - var(--space-8));
    height: 580px;
    max-height: calc(100vh - var(--space-16));
    background: var(--color-surface-solid);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}
.wcc-chat-panel[hidden] {
    display: none !important;
}

.wcc-chat-panel__header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    background: var(--color-primary-dark);
    border-bottom: 1px solid var(--color-border);
}
.wcc-chat-panel__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.wcc-chat-panel__team {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-base);
    color: var(--color-text);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wcc-chat-panel__status {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: 1.3;
}
/* Status dot — colour by data-state. AI / online = green;
   away = amber; offline = red; pending = warning amber;
   closed = grey muted. */
.wcc-chat-panel__status[data-state="online"]::before,
.wcc-chat-panel__status[data-state="away"]::before,
.wcc-chat-panel__status[data-state="offline"]::before,
.wcc-chat-panel__status[data-state="pending"]::before,
.wcc-chat-panel__status[data-state="ai"]::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 1px;
}
.wcc-chat-panel__status[data-state="ai"]::before,
.wcc-chat-panel__status[data-state="online"]::before { background: var(--color-online); }
.wcc-chat-panel__status[data-state="away"]::before    { background: var(--color-text-warning); }
.wcc-chat-panel__status[data-state="offline"]::before { background: var(--color-red); }
.wcc-chat-panel__status[data-state="pending"]::before { background: var(--color-text-warning); }
.wcc-chat-panel__close {
    background: transparent;
    color: var(--color-text);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity var(--transition-fast), background var(--transition-fast);
    flex-shrink: 0;
}
.wcc-chat-panel__close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}
.wcc-chat-panel__close:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ── Pre-chat form ───────────────────────────────────────── */
.wcc-chat-prechat {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.wcc-chat-prechat[hidden] { display: none !important; }
.wcc-chat-prechat__intro {
    margin: 0 0 var(--space-2);
    color: var(--color-text);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}
.wcc-chat-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.wcc-chat-form-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
}
.wcc-chat-form-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
.wcc-chat-form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.08);
}
.wcc-chat-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.wcc-chat-turnstile {
    min-height: 65px;
}
.wcc-chat-form-error {
    color: var(--color-text-error);
    font-size: var(--font-size-sm);
    margin: 0;
    padding: 8px 12px;
    background: rgba(217, 37, 22, 0.08);
    border: 1px solid rgba(217, 37, 22, 0.3);
    border-radius: 6px;
}
.wcc-chat-form-button {
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
}
.wcc-chat-form-button:hover { background: var(--color-accent-dark); }
.wcc-chat-form-button:disabled { opacity: 0.6; cursor: wait; }
.wcc-chat-form-privacy {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: var(--line-height-normal);
    margin: 0;
}
.wcc-chat-form-privacy a { color: var(--color-accent); }

/* ── Conversation view ───────────────────────────────────── */
.wcc-chat-conversation {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.wcc-chat-conversation[hidden] { display: none !important; }

.wcc-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    scroll-behavior: smooth;
}

/* Message bubble — base */
.wcc-chat-msg {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
    word-wrap: break-word;
}
.wcc-chat-msg__body { white-space: pre-wrap; }

/* Markdown elements inside the bubble (bot / agent / system) */
.wcc-chat-msg__body p {
    margin: 0;
    padding: 0;
}
.wcc-chat-msg__body p + p {
    margin-top: var(--space-2);
}
.wcc-chat-msg__body a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}
.wcc-chat-msg__body a:hover {
    color: var(--color-accent-dark);
}
.wcc-chat-msg__body strong { font-weight: var(--font-weight-bold); }
.wcc-chat-msg__body em     { font-style: italic; }
.wcc-chat-msg__body code {
    background: rgba(255, 255, 255, 0.10);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.92em;
    font-family: var(--font-family-mono);
}
.wcc-chat-msg__body ul,
.wcc-chat-msg__body ol {
    margin: var(--space-2) 0 0;
    padding-left: 1.4em;
}
.wcc-chat-msg__body li {
    margin-top: 2px;
}
/* Visitor bubbles already use the gold background — bot/agent are darker;
   but if a visitor message ever surfaced markdown, keep links readable on gold. */
.wcc-chat-msg--visitor .wcc-chat-msg__body a {
    color: var(--color-text-on-accent);
    text-decoration: underline;
}
[data-theme="light"] .wcc-chat-msg__body code {
    background: rgba(18, 57, 79, 0.08);
}
[data-theme="light"] .wcc-chat-msg__body a {
    color: #b8830d;
}

/* Visitor messages — right-aligned, gold */
.wcc-chat-msg--visitor {
    align-self: flex-end;
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    border-bottom-right-radius: 4px;
}

/* Bot messages — left-aligned, neutral */
.wcc-chat-msg--bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.10);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}

/* Agent messages — left-aligned, gold accent border to distinguish */
.wcc-chat-msg--agent {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
    border-left: 3px solid var(--color-accent);
}

/* System messages — centered, muted */
.wcc-chat-msg--system {
    align-self: center;
    background: transparent;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-style: italic;
    max-width: 100%;
    text-align: center;
}

/* ── Typing indicator ───────────────────────────────────── */
.wcc-chat-typing {
    flex: 0 0 auto;
    padding: 0 var(--space-4) var(--space-2);
    display: flex;
    gap: 4px;
    align-items: center;
}
.wcc-chat-typing[hidden] { display: none !important; }
.wcc-chat-typing__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-text-muted);
    opacity: 0.4;
    animation: wccChatTypingPulse 1.4s infinite;
}
.wcc-chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.wcc-chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes wccChatTypingPulse {
    0%, 60%, 100% { opacity: 0.4; transform: scale(1); }
    30%           { opacity: 1;   transform: scale(1.2); }
}

/* ── Composer ───────────────────────────────────────────── */
.wcc-chat-composer {
    flex: 0 0 auto;
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--color-border);
    background: rgba(0, 0, 0, 0.2);
    align-items: flex-end;
}
.wcc-chat-composer__input {
    flex: 1 1 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    font-family: inherit;
    line-height: var(--line-height-normal);
    resize: none;
    min-height: 40px;
    max-height: 96px;
    overflow-y: auto;
}
.wcc-chat-composer__input:focus {
    outline: none;
    border-color: var(--color-accent);
}
.wcc-chat-composer__send {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-text-on-accent);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), opacity var(--transition-fast);
}
.wcc-chat-composer__send:hover { background: var(--color-accent-dark); }
.wcc-chat-composer__send:disabled { opacity: 0.4; cursor: not-allowed; }
.wcc-chat-composer__send:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Paperclip / attach button */
.wcc-chat-composer__attach {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.wcc-chat-composer__attach:hover { color: var(--color-text); border-color: var(--color-accent); }
.wcc-chat-composer__attach:disabled { opacity: 0.5; cursor: wait; }

/* Attachment block inside a message bubble */
.wcc-chat-msg__attachment {
    margin-bottom: 6px;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
}
.wcc-chat-msg__attachment img {
    display: block;
    max-width: 100%;
    max-height: 240px;
    height: auto;
    border-radius: 10px;
    cursor: zoom-in;
}
.wcc-chat-msg__file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.10);
    color: var(--color-text);
    border-radius: 8px;
    text-decoration: none;
    font-size: var(--font-size-sm);
}
.wcc-chat-msg--visitor .wcc-chat-msg__file {
    background: rgba(0, 0, 0, 0.18);
    color: var(--color-text-on-accent);
}

/* ── Request Agent button (under composer) ──────────────── */
.wcc-chat-composer-actions {
    flex: 0 0 auto;
    padding: 0 var(--space-4) var(--space-3);
    display: flex;
    justify-content: center;
}
.wcc-chat-request-agent {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.wcc-chat-request-agent:hover:not(:disabled) {
    color: var(--color-text);
    border-color: var(--color-accent);
    background: rgba(232, 172, 37, 0.08);
}
.wcc-chat-request-agent:disabled { opacity: 0.5; cursor: wait; }
.wcc-chat-request-agent[hidden] { display: none !important; }

/* Restart button — primary action when conversation has ended */
#wcc-chat-restart {
    border-color: var(--color-accent);
    color: var(--color-text);
    background: var(--color-accent);
    color: var(--color-text-on-accent);
}
#wcc-chat-restart:hover:not(:disabled) {
    background: var(--color-accent-dark);
    color: var(--color-text-on-accent);
}

/* Status colours for the header subline */
.wcc-chat-panel__status[data-state="pending"] { color: var(--color-text-warning); }
.wcc-chat-panel__status[data-state="closed"]  { color: var(--color-text-muted); }
.wcc-chat-panel__status[data-state="away"]    { color: var(--color-text-warning); }
.wcc-chat-panel__status[data-state="offline"] { color: var(--color-red); }
.wcc-chat-panel__status[data-state="online"]  { color: var(--color-online); }
[data-theme="light"] .wcc-chat-request-agent {
    color: #5C7A8A;
    border-color: rgba(18, 57, 79, 0.18);
}
[data-theme="light"] .wcc-chat-request-agent:hover:not(:disabled) {
    color: #1A2B3C;
    background: rgba(232, 172, 37, 0.10);
}

/* ── Loading state ──────────────────────────────────────── */
.wcc-chat-loading {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-8);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}
.wcc-chat-loading[hidden] { display: none !important; }
.wcc-chat-loading__spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: wccChatSpin 0.8s linear infinite;
}
@keyframes wccChatSpin {
    to { transform: rotate(360deg); }
}

/* ── Mobile (480px and below) ───────────────────────────── */
@media (max-width: 480px) {
    .wcc-chat-launcher {
        right: var(--space-4);
        bottom: var(--space-4);
    }
    .wcc-chat-panel {
        right: var(--space-3);
        left: var(--space-3);
        bottom: calc(var(--space-4) + 56px + var(--space-2));
        width: auto;
        max-width: none;
        height: calc(100vh - 120px);
        max-height: calc(100vh - 120px);
    }
}

/* ── Light theme ────────────────────────────────────────── */
[data-theme="light"] .wcc-chat-panel {
    background: #ffffff;
    color: #1A2B3C;
    border-color: rgba(18, 57, 79, 0.12);
}
[data-theme="light"] .wcc-chat-panel__header { background: #12394F; }
[data-theme="light"] .wcc-chat-msg--bot {
    background: #f1f5f9;
    color: #1A2B3C;
}
[data-theme="light"] .wcc-chat-msg--agent {
    background: #e8f0f7;
    color: #1A2B3C;
}
[data-theme="light"] .wcc-chat-msg--system { color: #5C7A8A; }
[data-theme="light"] .wcc-chat-form-input,
[data-theme="light"] .wcc-chat-composer__input {
    background: #f8fafc;
    border-color: rgba(18, 57, 79, 0.18);
    color: #1A2B3C;
}
[data-theme="light"] .wcc-chat-form-label { color: #5C7A8A; }
[data-theme="light"] .wcc-chat-form-privacy { color: #5C7A8A; }
[data-theme="light"] .wcc-chat-composer { background: #f8fafc; border-top-color: rgba(18, 57, 79, 0.12); }
[data-theme="light"] .wcc-chat-typing__dot { background: #5C7A8A; }

/* ── Quick-reply chips (Phase 5) ────────────────────────────────
   Rendered below the latest bot message when send.php returns a
   quick_replies array. Click → submits the chip's value. */
.wcc-chat-chips {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 4px 16px 12px;
}
.wcc-chat-chip {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    cursor: pointer;
    min-height: 36px;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.wcc-chat-chip:hover, .wcc-chat-chip:active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.24);
}
.wcc-chat-chip--primary {
    background: #E8AC25;
    color: #0b1e2d;
    border-color: #E8AC25;
    font-weight: 700;
}
.wcc-chat-chip--primary:hover, .wcc-chat-chip--primary:active {
    background: #D4970F;
    border-color: #D4970F;
}
[data-theme="light"] .wcc-chat-chip {
    background: #ffffff;
    color: #1A2B3C;
    border-color: rgba(18, 57, 79, 0.18);
}
[data-theme="light"] .wcc-chat-chip:hover {
    background: #f1f5f9;
    border-color: rgba(18, 57, 79, 0.32);
}

/* ── CSAT card (Phase 7) ──────────────────────────────────────── */
.wcc-chat-csat {
    margin: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-align: center;
}
.wcc-chat-csat__title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}
.wcc-chat-csat__buttons {
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.wcc-chat-csat__btn {
    padding: 10px 16px;
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}
.wcc-chat-csat__btn:hover, .wcc-chat-csat__btn:active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}
.wcc-chat-csat__comment {
    margin-top: 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.wcc-chat-csat__comment textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
.wcc-chat-csat__send {
    padding: 10px 20px;
    min-height: 44px;
    background: #E8AC25;
    color: #0b1e2d;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    align-self: center;
}
.wcc-chat-csat__send:hover { background: #D4970F; }
.wcc-chat-csat__thanks {
    color: #6abf4a;
    font-size: 14px;
    font-weight: 600;
    padding: 8px;
}
[data-theme="light"] .wcc-chat-csat {
    background: #f1f5f9;
    border-color: rgba(18, 57, 79, 0.12);
}
[data-theme="light"] .wcc-chat-csat__title { color: #1A2B3C; }
[data-theme="light"] .wcc-chat-csat__btn {
    background: #ffffff;
    color: #1A2B3C;
    border-color: rgba(18, 57, 79, 0.18);
}
[data-theme="light"] .wcc-chat-csat__comment textarea {
    background: #ffffff;
    color: #1A2B3C;
    border-color: rgba(18, 57, 79, 0.18);
}
