/* App-wide styles — dark mode, with an intentionally-light header. */

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap");
@import url("tokens.css");

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--wci-surface-1);
    color: var(--wci-text-body);
    font-family: var(--wci-font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--wci-text-link);
    text-decoration: none;
    transition: color 120ms ease;
}
a:hover { color: var(--wci-navy-300); text-decoration: underline; }

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: var(--wci-text-strong);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: var(--wci-shadow-focus);
}

h1, h2, h3, h4 {
    font-family: var(--wci-font-serif);
    color: var(--wci-text-strong);
    margin: 0 0 var(--wci-space-3);
    line-height: 1.2;
    font-weight: 700;
}

code, pre {
    font-family: var(--wci-font-mono);
    font-size: 0.92em;
}

/* ──────────────────────────────────────────────────────────────────────────
 * Header — always WHITE. Sits on top of the dark page as an intentional
 * contrast strip so the WCI wordmark + stethoscope show in full brand color.
 * ──────────────────────────────────────────────────────────────────────── */

.app-header {
    background: #FFFFFF;
    color: var(--wci-navy);
    padding: var(--wci-space-3) var(--wci-space-5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 3px solid var(--wci-orange);  /* WCI signature accent */
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: var(--wci-space-3);
    color: var(--wci-navy);
}
.app-header__brand:hover { text-decoration: none; }

.app-header__logo {
    height: 38px;
    width: auto;
    display: block;
}

.app-header__title {
    font-family: var(--wci-font-sans);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #6B7280;
    border-left: 1px solid #E5E7EB;
    padding-left: var(--wci-space-3);
    margin-left: var(--wci-space-3);
}

.app-header__nav {
    display: flex;
    gap: var(--wci-space-2);
    align-items: center;
}

.app-header__nav a {
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--wci-radius-pill);
    transition: background 120ms ease, color 120ms ease;
}
.app-header__nav a:hover {
    color: var(--wci-navy);
    text-decoration: none;
    background: #F1F5F9;
}

.app-header__nav .badge {
    background: var(--wci-orange);
    color: white;
    padding: 2px 8px;
    border-radius: var(--wci-radius-pill);
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    letter-spacing: 0.4px;
}

/* "New chat" button override — light-bg ghost variant lives in the header */
.app-header .btn--ghost {
    background: transparent;
    color: #475569;
    border-color: #E5E7EB;
}
.app-header .btn--ghost:hover {
    background: #F1F5F9;
    color: var(--wci-navy);
    border-color: #CBD5E1;
}

/* ── buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--wci-space-2);
    padding: 10px 20px;
    border-radius: var(--wci-radius-pill);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.1px;
    transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
    border: 1px solid transparent;
}

.btn--primary {
    background: var(--wci-orange);
    color: white;
    box-shadow: 0 4px 14px rgba(243, 118, 33, 0.30);
}
.btn--primary:hover { background: #DC641A; box-shadow: 0 6px 20px rgba(243, 118, 33, 0.40); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary:disabled {
    background: var(--wci-surface-3);
    color: var(--wci-text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.btn--ghost {
    background: transparent;
    color: var(--wci-text-body);
    border-color: var(--wci-surface-3);
}
.btn--ghost:hover {
    background: var(--wci-surface-2);
    color: var(--wci-text-strong);
    border-color: var(--wci-surface-4);
}

.btn--small { padding: 6px 14px; font-size: 13px; }

/* ── pills + badges ──────────────────────────────────────────────────────── */

.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--wci-radius-pill);
    font-size: 12px;
    font-weight: 500;
    background: var(--wci-surface-2);
    color: var(--wci-text-body);
    border: 1px solid var(--wci-surface-3);
}

.pill--ok    { background: rgba(74, 222, 128, 0.12); color: var(--wci-success); border-color: rgba(74, 222, 128, 0.30); }
.pill--warn  { background: rgba(243, 118, 33, 0.12); color: var(--wci-orange); border-color: rgba(243, 118, 33, 0.30); }
.pill--error { background: rgba(248, 113, 113, 0.12); color: var(--wci-error); border-color: rgba(248, 113, 113, 0.30); }
.pill--info  { background: rgba(46, 121, 189, 0.12); color: var(--wci-navy-300); border-color: rgba(46, 121, 189, 0.30); }

/* ── footer ──────────────────────────────────────────────────────────────── */

.app-footer {
    text-align: center;
    padding: var(--wci-space-5);
    font-size: 12px;
    color: var(--wci-text-faint);
}
.app-footer strong { color: var(--wci-text-muted); font-weight: 600; }
