/* ══════════════════════════════════════════════════════════════════════════════
 * DCLM-K5 — Chat UI neumorphic styling parity audit.
 * Overrides flat bubbles/panels with dark-neumorphic depth matching THOR.
 * Loaded AFTER new-tabs.css so these rules win specificity ties on source order.
 * ══════════════════════════════════════════════════════════════════════════════ */

/* ── Modal shell — gradient + dual shadow ─────────────────────────────────── */
#dclChatModal {
    background: linear-gradient(145deg, #15152a, #0c0c1a) !important;
    border: 1px solid rgba(78,154,241,0.22) !important;
    box-shadow:
        10px 10px 30px rgba(0,0,0,0.55),
        -4px -4px 18px rgba(42,42,90,0.15),
        inset 1px 1px 0 rgba(255,255,255,0.03) !important;
    border-radius: 16px !important;
}

/* ── Ask-Kanzi top-bar button — true neumorphic raised ────────────────────── */
.ask-dcl-btn {
    background: linear-gradient(145deg, #1a1a2e, #0f0f1e) !important;
    box-shadow:
        6px 6px 12px rgba(0,0,0,0.45),
        -3px -3px 8px rgba(42,42,90,0.18),
        inset 1px 1px 0 rgba(255,255,255,0.04) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, text-shadow 0.15s ease !important;
}
.ask-dcl-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        8px 8px 16px rgba(0,0,0,0.55),
        -4px -4px 10px rgba(42,42,90,0.22),
        inset 1px 1px 0 rgba(255,255,255,0.05),
        0 0 12px rgba(78,154,241,0.28) !important;
    text-shadow: 0 0 10px rgba(78,154,241,0.55) !important;
}
.ask-dcl-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 3px 3px 8px rgba(0,0,0,0.55),
        inset -2px -2px 5px rgba(42,42,90,0.2) !important;
}

/* ── Chat bubbles — raised neumorphic depth ───────────────────────────────── */
.dcl-chat-bubble {
    box-shadow:
        4px 4px 10px rgba(0,0,0,0.45),
        -2px -2px 6px rgba(42,42,90,0.18),
        inset 1px 1px 0 rgba(255,255,255,0.03);
    transition: box-shadow 0.2s ease;
}
.dcl-chat-msg.user .dcl-chat-bubble {
    background: linear-gradient(145deg, #244677, #152e53) !important;
    border: 1px solid rgba(78,154,241,0.35) !important;
}
.dcl-chat-msg.assistant .dcl-chat-bubble {
    background: linear-gradient(145deg, #1c1c34, #131327) !important;
    border: 1px solid rgba(78,154,241,0.15) !important;
}

/* ── Thinking indicator — inset well ──────────────────────────────────────── */
.dcl-chat-thinking {
    background: #0e0e1c;
    border-radius: 12px;
    box-shadow:
        inset 3px 3px 6px rgba(0,0,0,0.5),
        inset -1px -1px 3px rgba(42,42,90,0.12);
    margin: 4px 0;
}

/* ── Reasoning panel — raised card ────────────────────────────────────────── */
.dcl-reasoning {
    background: linear-gradient(145deg, #12122a, #0a0a1c) !important;
    box-shadow:
        3px 3px 8px rgba(0,0,0,0.45),
        -1px -1px 4px rgba(42,42,90,0.15),
        inset 1px 1px 0 rgba(255,255,255,0.02);
    border-radius: 10px;
    border-left: 2px solid #9b59b6;
}

/* ── Suggestions — neumorphic chips ───────────────────────────────────────── */
.dcl-suggestion {
    background: linear-gradient(145deg, #161a2e, #0e1120) !important;
    box-shadow:
        3px 3px 6px rgba(0,0,0,0.4),
        -1px -1px 4px rgba(42,58,110,0.18),
        inset 1px 1px 0 rgba(255,255,255,0.02);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.dcl-suggestion:hover {
    transform: translateY(-1px);
    box-shadow:
        5px 5px 10px rgba(0,0,0,0.5),
        -2px -2px 6px rgba(42,58,110,0.22),
        inset 1px 1px 0 rgba(255,255,255,0.03);
}
.dcl-suggestion:active {
    transform: translateY(0);
    box-shadow:
        inset 3px 3px 6px rgba(0,0,0,0.55),
        inset -1px -1px 3px rgba(42,58,110,0.15);
}

/* ── Query history pills — soft neumorphic ────────────────────────────────── */
.dcl-history-pill {
    background: linear-gradient(145deg, #14142a, #0d0d1c) !important;
    box-shadow:
        2px 2px 5px rgba(0,0,0,0.4),
        -1px -1px 3px rgba(42,42,90,0.14);
    transition: transform 0.1s ease;
}
.dcl-history-pill:hover { transform: translateY(-1px); }

/* ── Ephemeral UI wrapper — raised panel ──────────────────────────────────── */
.dcl-ephemeral-wrap {
    box-shadow:
        4px 4px 10px rgba(0,0,0,0.45),
        -2px -2px 6px rgba(42,42,90,0.15);
}
.dcl-ephemeral-bar {
    background: linear-gradient(180deg, #14142e 0%, #0f0f20 100%) !important;
}

/* ── UI action buttons (save/fs/pdf/share) ────────────────────────────────── */
.dcl-ui-btn {
    background: linear-gradient(145deg, #171732, #0f0f20) !important;
    box-shadow:
        2px 2px 5px rgba(0,0,0,0.4),
        -1px -1px 3px rgba(42,42,90,0.15);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.dcl-ui-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        3px 3px 7px rgba(0,0,0,0.5),
        -1px -1px 4px rgba(42,42,90,0.2);
}
.dcl-ui-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 2px 2px 5px rgba(0,0,0,0.55),
        inset -1px -1px 3px rgba(42,42,90,0.15);
}

/* ── Reasoning stage rows ─────────────────────────────────────────────────── */
.dcl-reason-stage {
    background: linear-gradient(145deg, #1a1a30, #13132a) !important;
    box-shadow:
        2px 2px 5px rgba(0,0,0,0.35),
        -1px -1px 3px rgba(42,42,90,0.12),
        inset 1px 1px 0 rgba(255,255,255,0.02);
}

/* ── Input row + send button (if rendered via ask-dcl.js) ────────────────── */
#dclChatForm, .dcl-chat-form {
    background: #0a0a18;
    border-top: 1px solid rgba(78,154,241,0.14);
}
#dclChatInput, .dcl-chat-input {
    background: #0c0c1c !important;
    box-shadow:
        inset 3px 3px 6px rgba(0,0,0,0.55),
        inset -1px -1px 3px rgba(42,42,90,0.14) !important;
    border: 1px solid rgba(78,154,241,0.22) !important;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
#dclChatInput:focus, .dcl-chat-input:focus {
    border-color: #4e9af1 !important;
    box-shadow:
        inset 3px 3px 6px rgba(0,0,0,0.55),
        inset -1px -1px 3px rgba(42,42,90,0.14),
        0 0 0 2px rgba(78,154,241,0.18) !important;
}
#dclChatSend, .dcl-chat-send {
    background: linear-gradient(180deg, #4e9af1 0%, #3a7fd0 100%) !important;
    border: 1px solid #4e9af1 !important;
    box-shadow:
        3px 3px 7px rgba(0,0,0,0.45),
        -1px -1px 3px rgba(120,160,255,0.15) !important;
    transition: transform 0.1s ease, filter 0.1s ease;
}
#dclChatSend:hover, .dcl-chat-send:hover { filter: brightness(1.08); transform: translateY(-1px); }
#dclChatSend:active, .dcl-chat-send:active {
    transform: translateY(0);
    box-shadow:
        inset 2px 2px 5px rgba(0,0,0,0.45),
        inset -1px -1px 3px rgba(120,160,255,0.12) !important;
}

/* ── Memory badge ─────────────────────────────────────────────────────────── */
#chatMemoryBadge, .dcl-memory-badge {
    background: rgba(78,154,241,0.1) !important;
    box-shadow:
        inset 2px 2px 4px rgba(0,0,0,0.35),
        inset -1px -1px 2px rgba(78,154,241,0.08) !important;
}

/* ── Fullscreen edit bar parity ───────────────────────────────────────────── */
.dcl-fs-edit-input {
    background: #0c0c1c !important;
}
.dcl-fs-edit-btn {
    box-shadow:
        3px 3px 7px rgba(0,0,0,0.45),
        -1px -1px 3px rgba(120,160,255,0.15) !important;
}
.dcl-fs-edit-btn:active {
    box-shadow:
        inset 2px 2px 5px rgba(0,0,0,0.45),
        inset -1px -1px 3px rgba(120,160,255,0.12) !important;
}
