/* Calm theme overrides layered after the main chat styles. */
:root {
    --eye-dark-surface: rgba(255, 255, 255, .045);
    --eye-dark-surface-2: rgba(255, 255, 255, .065);
    --eye-dark-line: rgba(176, 184, 222, .16);
    --eye-dark-line-strong: rgba(183, 190, 228, .24);
    --eye-dark-muted: #9da5c9;
    --eye-dark-primary: #9c96ff;
}

body.light-theme {
    --eye-surface: #ffffff;
    --eye-surface-2: #f7f8fc;
    --eye-surface-3: #f1f4fa;
    --eye-line: #e2e7f1;
    --eye-line-strong: #d3dae8;
    --eye-text: #232738;
    --eye-text-2: #596175;
    --eye-muted: #7c8498;
    --eye-primary: #6d65df;
    --eye-primary-soft: rgba(109, 101, 223, .10);
    --eye-primary-line: rgba(109, 101, 223, .22);
}

body:not(.light-theme) {
    --eye-surface: var(--eye-dark-surface);
    --eye-surface-2: var(--eye-dark-surface-2);
    --eye-line: var(--eye-dark-line);
    --eye-line-strong: var(--eye-dark-line-strong);
    --eye-muted: var(--eye-dark-muted);
    --eye-primary: var(--eye-dark-primary);
    --eye-primary-soft: rgba(156, 150, 255, .13);
    --eye-primary-line: rgba(156, 150, 255, .24);
}

body.light-theme .chat-main,
body.light-theme .chat-messages,
body.light-theme .messages-container {
    background: #f7f8fc !important;
}

body.light-theme .sidebar {
    background: #fbfcff !important;
    border-color: var(--eye-line) !important;
}

body.light-theme .chat-topbar,
body.light-theme .chat-input-area,
body.light-theme .input-wrapper {
    background: rgba(255, 255, 255, .92) !important;
    border-color: var(--eye-line) !important;
    box-shadow: none !important;
}

body.light-theme .think-block:not(.think-summary-only),
body.light-theme .cli-step-card.osc-tool-stripe,
body.light-theme .message-events-stream .cli-step-card {
    background: var(--eye-surface) !important;
    border-color: var(--eye-line) !important;
    box-shadow: 0 1px 2px rgba(26, 34, 55, .035) !important;
}

body.light-theme .think-block:not(.think-summary-only):hover,
body.light-theme .cli-step-card.osc-tool-stripe:hover {
    border-color: var(--eye-line-strong) !important;
    box-shadow: 0 2px 8px rgba(26, 34, 55, .045) !important;
}

body.light-theme .think-header,
body.light-theme .think-block.think-summary-only .think-header {
    color: var(--eye-primary) !important;
}

body.light-theme .think-content,
body.light-theme .cli-step-meta,
body.light-theme .cli-step-path,
body.light-theme .message-meta {
    color: var(--eye-text-2) !important;
}

body.light-theme .message-events-stream,
body.light-theme .cli-agent-steps {
    background: transparent !important;
}

body.light-theme .msg-attach {
    background: var(--eye-surface) !important;
    border-color: var(--eye-line) !important;
    box-shadow: 0 1px 2px rgba(26, 34, 55, .04) !important;
}

body.light-theme .msg-attach:hover {
    background: #fbfcff !important;
    border-color: var(--eye-line-strong) !important;
    transform: none !important;
}

body.light-theme .msg-attach-name {
    color: var(--eye-text) !important;
}

body.light-theme .msg-attach-meta,
body.light-theme .msg-attach-size {
    color: var(--eye-muted) !important;
}

body.light-theme .msg-attach-act,
body.light-theme .msg-attach-dl,
body.light-theme .attachment-action,
body.light-theme .file-action-btn {
    background: var(--eye-surface-3) !important;
    border-color: #d8deeb !important;
    color: #687086 !important;
    box-shadow: none !important;
}

body.light-theme .msg-attach-act:hover,
body.light-theme .msg-attach-dl:hover,
body.light-theme .attachment-action:hover,
body.light-theme .file-action-btn:hover {
    background: #eaf0fb !important;
    border-color: #cbd4e5 !important;
    color: #514bd0 !important;
    transform: none !important;
}

body.light-theme .message-actions button,
body.light-theme .message-action,
body.light-theme .msg-action-btn,
body.light-theme .copy-btn,
body.light-theme .feedback-btn {
    color: #8a92a8 !important;
    opacity: .82 !important;
}

body.light-theme .message-actions button:hover,
body.light-theme .message-action:hover,
body.light-theme .msg-action-btn:hover,
body.light-theme .copy-btn:hover,
body.light-theme .feedback-btn:hover {
    background: var(--eye-primary-soft) !important;
    color: var(--eye-primary) !important;
    opacity: 1 !important;
}

body.light-theme .setting-toggle .toggle-slider {
    background: #dce2ee !important;
    border-color: #cfd7e6 !important;
    box-shadow: none !important;
}

body.light-theme .setting-toggle .toggle-slider::after,
body.light-theme .setting-toggle .toggle-slider::before {
    background: #7f889c !important;
    box-shadow: none !important;
}

body.light-theme .setting-toggle input:checked + .toggle-slider,
body.light-theme .setting-toggle .toggle-slider.active {
    background: #7d73e8 !important;
    border-color: #7d73e8 !important;
}

body.light-theme .setting-toggle input:checked + .toggle-slider::after,
body.light-theme .setting-toggle input:checked + .toggle-slider::before,
body.light-theme .setting-toggle .toggle-slider.active::after,
body.light-theme .setting-toggle .toggle-slider.active::before {
    background: #ffffff !important;
}

body.light-theme .model-selector-sidebar,
body.light-theme .selected-model-card,
body.light-theme .model-select-card,
body.light-theme .current-model,
body.light-theme .memory-widget,
body.light-theme .token-usage-card {
    background: var(--eye-surface) !important;
    border-color: var(--eye-line) !important;
    box-shadow: none !important;
}

body.light-theme .model-selector-sidebar:hover,
body.light-theme .selected-model-card:hover,
body.light-theme .model-select-card:hover,
body.light-theme .current-model:hover {
    border-color: var(--eye-line-strong) !important;
}

body.light-theme .sidebar-section,
body.light-theme .sidebar-divider {
    border-color: var(--eye-line) !important;
}

body:not(.light-theme) .msg-attach,
body:not(.light-theme) .think-block:not(.think-summary-only),
body:not(.light-theme) .cli-step-card.osc-tool-stripe,
body:not(.light-theme) .message-events-stream .cli-step-card {
    background: var(--eye-surface) !important;
    border-color: var(--eye-line) !important;
    box-shadow: none !important;
}

body:not(.light-theme) .msg-attach:hover,
body:not(.light-theme) .think-block:not(.think-summary-only):hover,
body:not(.light-theme) .cli-step-card.osc-tool-stripe:hover {
    background: var(--eye-surface-2) !important;
    border-color: var(--eye-line-strong) !important;
    transform: none !important;
}

body:not(.light-theme) .msg-attach-act,
body:not(.light-theme) .msg-attach-dl,
body:not(.light-theme) .attachment-action,
body:not(.light-theme) .file-action-btn {
    background: rgba(255, 255, 255, .055) !important;
    border-color: rgba(176, 184, 222, .18) !important;
    color: #aeb6d6 !important;
}

body:not(.light-theme) .msg-attach-act:hover,
body:not(.light-theme) .msg-attach-dl:hover,
body:not(.light-theme) .attachment-action:hover,
body:not(.light-theme) .file-action-btn:hover {
    background: rgba(156, 150, 255, .14) !important;
    border-color: var(--eye-primary-line) !important;
    color: #d8dbff !important;
    transform: none !important;
}

body:not(.light-theme) .message-actions button,
body:not(.light-theme) .message-action,
body:not(.light-theme) .msg-action-btn,
body:not(.light-theme) .copy-btn,
body:not(.light-theme) .feedback-btn {
    color: var(--eye-muted) !important;
    opacity: .78 !important;
}

body:not(.light-theme) .message-actions button:hover,
body:not(.light-theme) .message-action:hover,
body:not(.light-theme) .msg-action-btn:hover,
body:not(.light-theme) .copy-btn:hover,
body:not(.light-theme) .feedback-btn:hover {
    background: var(--eye-primary-soft) !important;
    color: #d8dbff !important;
    opacity: 1 !important;
}

body:not(.light-theme) .setting-toggle .toggle-slider {
    background: #282d40 !important;
    border-color: #373d53 !important;
    box-shadow: none !important;
}

body:not(.light-theme) .setting-toggle input:checked + .toggle-slider,
body:not(.light-theme) .setting-toggle .toggle-slider.active {
    background: #665ed5 !important;
    border-color: #746de2 !important;
}
