/* InfoVets Help & Support — visual language mirrors the Flutter app
   (see lib/theme/app_theme.dart + app_spacing.dart). */

:root {
    /* Canyon Cares brand palette (from AppTheme) */
    --navy: #073771;          /* primary */
    --sky-blue: #3a80ae;      /* secondary */
    --light: #e6f3f9;         /* tertiary */
    --very-dark: #003047;
    --blue-grey: #4d6e7e;
    --dark-navy-font: #00354e;
    --dark-grey-fg: #474747;
    --muted-grey: #969696;
    --grey-500: #9e9e9e;
    --divider: #e9e9e9;
    --page-bg: #eeeeee;       /* grey-200 scaffold background */
    --surface: #ffffff;

    /* Shape + spacing (AppSpacing / cardTheme) */
    --radius: 16px;
    --radius-sm: 12px;
    --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    --content-max: 800px;     /* ownerPageMaxWidth */
    --pad: 16px;              /* compact */
    --pad-lg: 24px;           /* medium+ */

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    color: var(--dark-navy-font);
    background-color: var(--page-bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    color: var(--navy);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.5em;
}

/* Blazor's FocusOnNavigate moves focus to the <h1> on each route change for
   screen-reader users; suppress the visible outline on that programmatic focus
   (it's a non-interactive heading, not a keyboard target). */
[tabindex="-1"]:focus {
    outline: none;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
}

h2 {
    font-size: 1.35rem;
    margin-top: 1.75rem;
}

p {
    margin: 0 0 1rem;
    color: var(--dark-grey-fg);
}

a {
    color: var(--sky-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Layout shell ───────────────────────────────────────────── */
.page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 12px var(--pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    height: 28px;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

.site-nav a.active {
    color: #fff;
    background: var(--sky-blue);
}

/* ── Content ────────────────────────────────────────────────── */
main {
    flex: 1;
    width: 100%;
}

.content {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: var(--pad) var(--pad) 48px;
}

.hero {
    background: linear-gradient(160deg, var(--navy), var(--sky-blue));
    color: #fff;
}

.hero .content {
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero h1 {
    color: #fff;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    max-width: 46ch;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin: 16px 0;
}

.card h2 {
    margin-top: 0;
}

/* Card grid for the help home */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.card-grid .card {
    margin: 0;
}

.card-link {
    display: block;
    color: inherit;
}

.card-link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    transition: transform 0.15s ease;
}

.card-link h2 {
    color: var(--navy);
}

/* ── App-store badges (coming soon) ─────────────────────────── */
.coming-soon-tag {
    display: inline-block;
    background: var(--sky-blue);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hero .coming-soon-tag {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin-top: 8px;
}

/* Badges are decorative-only until launch: dimmed, non-interactive, and never
   wrapped in a link so nothing navigates. */
.store-badge {
    display: inline-flex;
    width: 168px;
    max-width: 47%;
    cursor: default;
    opacity: 0.55;
}

.store-badge img {
    width: 100%;
    height: auto;
    display: block;
}

.store-badges__note {
    width: 100%;
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: var(--muted-grey);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    font-family: var(--font);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 22px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--very-dark);
    text-decoration: none;
}

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-item {
    border-bottom: 1px solid var(--divider);
    padding: 4px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--navy);
    padding: 14px 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    color: var(--sky-blue);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: '–';
}

.faq-item__body {
    padding: 0 0 14px;
}

.faq-item__body p:last-child {
    margin-bottom: 0;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--very-dark);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.site-footer__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 20px var(--pad);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Loading + error UI ─────────────────────────────────────── */
.app-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--navy);
}

.app-loading__logo {
    width: 96px;
    height: auto;
}

.app-loading__spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#blazor-error-ui {
    background: #ffe9e0;
    color: var(--very-dark);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 600px) {

    .site-header__inner,
    .content,
    .site-footer__inner {
        padding-left: var(--pad-lg);
        padding-right: var(--pad-lg);
    }
}
