/* Guide Star Health brand palette (official brand sheet, 2026; updated
   2026-08-08 to match guidestarhealth.net's typography + background/card
   tokens — see the "Fonts" note below). Defined once here so a future
   rebrand is a single-place edit. */
:root {
    --gsh-navy: #00295D;       /* primary */
    --gsh-navy-dark: #001E45;  /* button hover / pressed */
    --gsh-gold: #CA9C44;       /* accent — use sparingly */
    --gsh-gold-light: #E5C96A; /* secondary accent */
    --gsh-slate: #69839C;      /* UI secondary (not on the brand sheet; kept for now) */
    --gsh-bg: #F5F6F8;         /* app background, behind content cards */
    --gsh-card-bg: #FFFFFF;    /* content cards */

    --gsh-font-heading: 'Instrument Serif', Georgia, serif;
    --gsh-font-body: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* App-wide radius standardization (2026-08-08), extending the chat page's
       rounder look to the rest of the app. Overriding Bootstrap 5's own radius
       variables — rather than hand-editing every .card/.btn/.alert/.form-control
       — cascades this to every Bootstrap component app-wide (Care Circle and
       the admin pages have no custom CSS of their own, so they pick this up
       for free). --bs-border-radius-pill is untouched (already fully round,
       correct for the symptom tap-select pills); --sm gets a smaller bump than
       the 16-24px target so dense multi-button rows (severity pickers, PD
       stage, times-per-day) don't turn chunky. */
    --bs-border-radius: 1.125rem;    /* 18px, was 6px  — cards, alerts, default buttons/inputs */
    --bs-border-radius-lg: 1.25rem;  /* 20px, was 8px  — large buttons/inputs */
    --bs-border-radius-sm: 0.625rem; /* 10px, was 4px  — small/compact controls */
}

html, body {
    font-family: var(--gsh-font-body);
}

/* Fonts (2026-08-08): matches guidestarhealth.net — Instrument Serif for
   page titles/greeting-style copy, Inter Tight for everything else. This
   supersedes the earlier "app UI font is already Helvetica, no change
   needed" note from the 2026-06-30 brand sheet — Pete confirmed the swap
   2026-08-08 to follow the marketing site's now-current direction. */
h1, h2, h3 {
    font-family: var(--gsh-font-heading);
}

a, .btn-link {
    color: var(--gsh-navy);
}

.btn-primary {
    color: #fff;
    background-color: var(--gsh-navy);
    border-color: var(--gsh-navy);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary:disabled, .btn-primary.disabled {
    color: #fff;
    background-color: var(--gsh-navy-dark);
    border-color: var(--gsh-navy-dark);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--gsh-slate);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* Page-title icon (NavIcon reused outside the sidebar — same nav item's icon,
   set beside its page's own <h1>/<h2> so the two stay visually paired). Plain
   global rule rather than a scoped .razor.css because NavIcon's "nav-icon"
   class carries no scope attribute of its own when used from a page that
   isn't NavMenu. */
h1 .nav-icon, h2 .nav-icon {
    width: 1.4rem;
    height: 1.4rem;
    margin-right: 0.6rem;
    vertical-align: -0.2rem;
    color: var(--gsh-navy);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5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DI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ───────────────────────────────────────────────────────────────
   Branded frame for the classic Razor Pages auth screens
   (sign in / create account / access denied). Kept here so the
   brand palette stays single-sourced with the rest of the app.
   ─────────────────────────────────────────────────────────────── */
.auth-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--gsh-bg);
}

/* Light panel, matching the sidebar's own header treatment (2026-08-08
   redesign) — these Razor Pages auth screens predated that pass and were
   still carrying the old navy gradient bar + boxed white logo chip. A
   hairline border is enough separation now that both sides are light. */
.auth-header {
    background: var(--gsh-bg);
    border-bottom: 1px solid #e3e6eb;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
}

.auth-brand-logo {
    /* Matches the sidebar's own logo size (NavMenu.razor.css) so the wordmark
       reads at the same scale everywhere in the app, not just on this screen. */
    height: 5rem;
    width: auto;
    display: block;
}

.auth-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background-color: #ffffff;
    border: 1px solid #e3e6eb;
    border-radius: 1.25rem;
    box-shadow: 0 6px 24px rgba(24, 48, 83, 0.08);
    padding: 2.25rem 2rem;
}

.auth-card h1 {
    color: var(--gsh-navy);
    font-size: 1.6rem;
}

.auth-card .auth-subtext {
    color: var(--gsh-slate);
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

.auth-intro {
    color: var(--gsh-slate);
    margin-bottom: 1.5rem;
}

/* Duplicate of the "Sign in" link that already lives at the bottom of the
   Register form — the form has enough fields that on shorter screens the
   bottom link can sit below the fold, so it's echoed up here too. */
.auth-top-link {
    text-align: right;
    font-size: 0.85rem;
    color: var(--gsh-slate);
    margin-bottom: 1.25rem;
}

.auth-trust-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--gsh-slate);
    font-size: 0.85rem;
    margin-top: 1.25rem;
}

.auth-trust-line svg {
    flex: none;
    color: var(--gsh-slate);
}

.auth-footer {
    text-align: center;
    padding: 1rem;
    color: var(--gsh-slate);
    font-size: 0.85rem;
}

/* ───────────────────────────────────────────────────────────────
   Highlights / Resources — responsive card grid + group headings
   ─────────────────────────────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.content-group-title {
    font-size: 1.15rem;
    color: var(--gsh-navy);
    margin: 1.75rem 0 0.9rem;
}

    .content-group-title:first-of-type {
        margin-top: 0.5rem;
    }

/* Saved answers — bookmarked Q+A cards. */
.saved-card {
    border: 1px solid #e3e6eb;
    border-radius: 1.25rem;
    background: #fff;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
}

.saved-q {
    /* A structural break (size + rule), not just color — navy vs. the answer's
       #333 bold headings read as near-identical at matching weight/size. */
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gsh-navy);
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--gsh-gold-light);
}

/* Collapsible topic title — same look as .saved-q, but a real button so the
   answer body can be hidden until expanded. */
.saved-q-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    border: none;
    background: none;
    padding: 0;
    margin-bottom: 0.6rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--gsh-gold-light);
    cursor: pointer;
    text-align: left;
}

.saved-q-chevron {
    flex: none;
    display: inline-block;
    transition: transform 0.15s ease;
    color: var(--gsh-navy);
}

    .saved-q-chevron.expanded {
        transform: rotate(90deg);
    }

.saved-q-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gsh-navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-a {
    color: #333;
    line-height: 1.6;
}

.saved-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--gsh-slate);
}

/* Avatars — uploaded photo or initials-on-color fallback. */
.gsh-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex: none;
    display: inline-block;
}

.gsh-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.avatar-color-swatch {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
}

    .avatar-color-swatch.selected {
        border-color: var(--gsh-slate);
    }

/* Small read-receipt avatars on a Shared item — who's seen this. */
.read-receipts {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

    .read-receipts .gsh-avatar,
    .read-receipts .gsh-avatar-initials {
        margin-left: -0.4rem;
        border: 2px solid #fff;
    }

        .read-receipts .gsh-avatar:first-child,
        .read-receipts .gsh-avatar-initials:first-child {
            margin-left: 0;
        }

/* Configurable intro blurb at the top of the Home/Highlights landing. */
.highlights-intro {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

    .highlights-intro p:last-child {
        margin-bottom: 0;
    }

/* ───────────────────────────────────────────────────────────────
   Global footer (in-app + auth pages) and legal document pages
   ─────────────────────────────────────────────────────────────── */
.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1.25rem;
    padding: 1rem 2rem;
    border-top: 1px solid #e3e6eb;
    color: var(--gsh-slate);
    font-size: 0.85rem;
}

.site-footer-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.site-footer a,
.auth-footer a {
    color: var(--gsh-slate);
    text-decoration: none;
}

    .site-footer a:hover,
    .auth-footer a:hover {
        text-decoration: underline;
    }

.auth-footer .site-footer-links {
    display: flex;
    justify-content: center;
    margin-top: 0.4rem;
}

.legal-draft-banner {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
}

.legal-content {
    line-height: 1.6;
}

    .legal-content h1 {
        color: var(--gsh-navy);
        font-size: 1.8rem;
    }

    .legal-content h2 {
        color: var(--gsh-navy);
        font-size: 1.3rem;
        margin-top: 1.6rem;
    }

    .legal-content h3 {
        font-size: 1.1rem;
        margin-top: 1.2rem;
    }

    .legal-content blockquote {
        border-left: 3px solid var(--gsh-gold);
        background: #faf7f0;
        margin: 1rem 0;
        padding: 0.5rem 1rem;
        color: #555;
    }

    .legal-content code {
        background: #f1f3f6;
        padding: 0.1rem 0.3rem;
        border-radius: 4px;
    }

/* PWA install nudge (2026-09-06) — iOS Safari only, shown/hidden by
   js/pwa.js. Fixed to the bottom of the viewport like a standard install
   banner; env(safe-area-inset-bottom) keeps it clear of the iPhone home
   indicator. High-contrast navy/white with a gold accent line, and a
   44px-minimum dismiss target for anyone with reduced fine motor control. */
.ios-install-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--gsh-navy);
    color: #fff;
    border-top: 3px solid var(--gsh-gold);
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)) 1rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
}

.ios-install-banner-text {
    flex: 1 1 auto;
    font-size: 0.95rem;
    line-height: 1.4;
}

.ios-install-banner-dismiss {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.ios-install-banner-dismiss:hover,
.ios-install-banner-dismiss:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}