/* app.css — eval-claw light theme overrides (ChatGPT style) */

:root {
    /* Light theme — ChatGPT style */
    --bg-primary:    #ffffff;
    --bg-secondary:  #f9f9f9;
    --bg-surface:    #ffffff;
    --bg-input:      #f4f4f4;
    --bg-hover:      #ececec;
    --bg-user-msg:   #f4f4f4;
    --bg-asst-msg:   transparent;
    --text-primary:  #0d0d0d;
    --text-secondary:#6e6e80;
    --text-accent:   #0d0d0d;
    --border:        #e5e5e5;
    --accent:        #0d0d0d;
    --accent-hover:  #333333;
    --success:       #10a37f;
    --warning:       #f59e0b;
    --error:         #ef4444;
    --tool-bg:       #f9f9f9;
    --font-sans:     -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-mono:     'Söhne Mono', 'Fira Code', 'Cascadia Code', monospace;
    --sidebar-width: 260px;
    --msg-max-width: 768px;
    --radius:        8px;
    --radius-lg:     24px;
    --transition:    150ms ease;
}

/* Scrollbar — light */
::-webkit-scrollbar-thumb {
    background: #d1d1d1;
}
::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Code blocks — light GitHub style */
.webui-msg pre code {
    background: #f6f8fa !important;
    color: #24292e;
}

.webui-msg code {
    background: #f6f8fa;
    color: #24292e;
}

/* Sidebar — light, clean */
.webui-sidebar {
    border-right: 1px solid var(--border);
}

.webui-sidebar__nav-item--active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* New chat button — subtle, not full accent */
.claw-new-chat {
    width: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
}

.claw-new-chat:hover {
    background: var(--bg-hover);
}

/* Sidebar section headers */
.claw-sidebar-section {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 12px 12px 4px;
}

/* Session item with timestamp */
.claw-session-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.claw-session-item__preview {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.claw-session-item__time {
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Chat area centering */
.claw-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    gap: 16px;
}

.claw-chat-empty__title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.claw-chat-empty__subtitle {
    font-size: 14px;
}

/* Tool call input/result sections */
.claw-tool-section {
    margin: 4px 0;
}

.claw-tool-section__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

/* WhatsApp status badge */
.claw-wa-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Vault dialog steps */
.claw-vault-step {
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Account card actions */
.claw-account-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

/* Panel toolbar */
.claw-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Settings section */
.claw-settings-section {
    margin-bottom: 24px;
}

.claw-settings-section__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Mobile menu toggle */
.claw-menu-toggle {
    display: none;
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 600;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .claw-menu-toggle {
        display: flex;
    }
}

/* ===== Light theme component overrides ===== */

/* Primary button — dark bg, white text */
.webui-btn--primary {
    background: #0d0d0d;
    color: #ffffff;
}
.webui-btn--primary:hover {
    background: #333333;
}

/* Secondary button — light */
.webui-btn--secondary,
.webui-btn:not(.webui-btn--primary):not(.webui-btn--danger):not(.webui-btn--ghost) {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.webui-btn--secondary:hover,
.webui-btn:not(.webui-btn--primary):not(.webui-btn--danger):not(.webui-btn--ghost):hover {
    background: var(--bg-hover);
}

/* Send button — dark circle, white icon */
.webui-chat-input__send {
    background: #0d0d0d;
    color: #ffffff;
    border-radius: 50%;
}
.webui-chat-input__send:hover {
    background: #333333;
}
.webui-chat-input__send:disabled {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

/* Chat input area — no border-top, centered pill */
.webui-chat-input {
    border-top: none;
    background: var(--bg-primary);
    padding: 12px 20px 16px;
}

.webui-chat-input__wrapper {
    max-width: var(--msg-max-width);
    margin: 0 auto;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: 4px 4px 4px 0;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.webui-chat-input__textarea {
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    padding: 10px 16px;
}
.webui-chat-input__textarea:focus {
    border-color: transparent;
    outline: none;
}

/* Messages — centered, wider */
.webui-messages {
    padding: 20px;
    align-items: center;
}

.webui-msg {
    width: 100%;
    max-width: var(--msg-max-width);
}

.webui-msg--user {
    background: var(--bg-user-msg);
    align-self: center;
    border-radius: var(--radius-lg);
    border-bottom-right-radius: 4px;
}

.webui-msg--assistant {
    background: transparent;
    align-self: center;
    border-radius: 0;
    padding: 12px 16px;
}

/* Modal overlay — lighter */
.webui-modal-overlay {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.webui-modal {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
}

/* Toasts — light with colored left border */
.webui-toast {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    border-left-width: 4px;
}
.webui-toast--success { border-left-color: var(--success); background: var(--bg-surface); }
.webui-toast--error   { border-left-color: var(--error);   background: var(--bg-surface); }
.webui-toast--info    { border-left-color: #2563eb;        background: var(--bg-surface); }
.webui-toast--warning { border-left-color: var(--warning);  background: var(--bg-surface); }

/* Badges — light bg variants */
.webui-badge--success { background: #ecfdf5; color: #065f46; }
.webui-badge--warning { background: #fffbeb; color: #92400e; }
.webui-badge--error   { background: #fef2f2; color: #991b1b; }
.webui-badge--info    { background: #eff6ff; color: #1e40af; }
.webui-badge--default { background: var(--bg-input); color: var(--text-secondary); }

/* Cards — subtle border on white */
.webui-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

/* Tool calls — light */
.webui-tool__body {
    background: var(--bg-secondary);
}

/* Status bar */
.webui-statusbar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

/* Select dropdown arrow fix for light theme */
.webui-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%236e6e80' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* Mobile sidebar backdrop — lighter */
@media (max-width: 768px) {
    .webui-sidebar-backdrop {
        background: rgba(0, 0, 0, 0.2);
    }
}
