/*
 * Mass finder bridge into the LA Churches token design (DESIGN_SPEC.md).
 * Loaded after tokens.css + theme-lachurches.css on finder pages; remaps the
 * legacy mass-finder-v2 palette onto --lac-* tokens so /mass, /confession,
 * and /adoration match the homepage shell in both light and dark sepia.
 * Scoped to html.theme-lachurches; legacy tenants without the class keep v2.
 */

html.theme-lachurches {
    --color-bg: var(--lac-bg);
    --color-bg-card: var(--lac-bg-warm);
    --color-bg-card-hover: var(--lac-bg-warm);
    --color-text: var(--lac-ink);
    --color-text-muted: var(--lac-ink-2);
    --color-text-dim: var(--lac-ink-2);
    --color-accent: var(--lac-gold-deep);
    --color-success: #2e7d32;
    --color-warning: var(--lac-gold-deep);
    --color-danger: var(--lac-red);
    --color-border: var(--lac-rule);
    --color-border-subtle: var(--lac-rule);
    background: var(--lac-bg);
}

@media (prefers-color-scheme: dark) {
    html.theme-lachurches {
        --color-accent: var(--lac-gold-deep-dark);
        --color-success: #7dbb6f;
        --color-warning: var(--lac-gold-deep-dark);
        --color-danger: var(--lac-red-dark);
    }
}

html.theme-lachurches body {
    background: var(--lac-bg);
    color: var(--lac-ink);
    font-family: var(--lac-serif);
}

/* ── Search header ──────────────────────────────────────────────── */

/* Clear the fixed 61px top-nav, then breathe like the homepage finder. */
html.theme-lachurches .search-header {
    padding-top: 112px;
}

html.theme-lachurches .search-header h1 {
    font-family: var(--lac-display);
    font-weight: 700;
    font-size: clamp(30px, 7vw, 46px);
    line-height: 1.08;
    letter-spacing: 0.02em;
    color: var(--lac-ink);
}

html.theme-lachurches .btn-location {
    min-height: 52px;
    padding: 14px 28px;
    font-family: var(--lac-display);
    font-weight: 700;
    font-size: var(--lac-text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--lac-ink);
    color: var(--lac-bg);
    border: 1px solid var(--lac-ink);
    border-radius: var(--lac-radius-sm, 6px);
    box-shadow: none;
    transition: background 120ms ease, border-color 120ms ease;
}

html.theme-lachurches .btn-location:hover {
    transform: none;
    filter: none;
    background: var(--lac-gold-deep);
    border-color: var(--lac-gold-deep);
    box-shadow: none;
}

html.theme-lachurches .btn-location:active {
    transform: none;
    filter: none;
    box-shadow: none;
}

/* Replace the emoji pin with the homepage's gold locate dot. */
html.theme-lachurches .btn-location .icon {
    display: none;
}

html.theme-lachurches .btn-location::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lac-gold);
    box-shadow: 0 0 0 3px rgba(160, 128, 48, 0.25);
}

html.theme-lachurches .btn-location:hover::before {
    background: var(--lac-bg);
    box-shadow: none;
}

html.theme-lachurches .or-divider {
    font-family: var(--lac-serif);
    font-style: italic;
    text-transform: none;
    letter-spacing: normal;
    font-size: var(--lac-text-sm);
}

html.theme-lachurches .address-input-wrap input {
    min-height: 48px;
    font-family: var(--lac-serif);
    font-size: var(--lac-text-md);
    color: var(--lac-ink);
    background: var(--lac-bg);
    border: 1px solid var(--lac-rule);
}

html.theme-lachurches .address-input-wrap input::placeholder {
    color: var(--lac-ink-2);
    font-style: italic;
}

html.theme-lachurches .address-input-wrap input:focus {
    border-color: var(--lac-gold);
    box-shadow: none;
}

html.theme-lachurches .btn-go {
    background: var(--lac-ink);
    border: 1px solid var(--lac-ink);
    color: var(--lac-bg);
    font-family: var(--lac-display);
    font-weight: 700;
    font-size: var(--lac-text-xs);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

html.theme-lachurches .btn-go:hover {
    background: var(--lac-gold-deep);
    border-color: var(--lac-gold-deep);
    color: var(--lac-bg);
}

html.theme-lachurches .browse-fallback a {
    font-family: var(--lac-serif);
    font-style: italic;
    font-size: var(--lac-text-sm);
    color: var(--lac-ink-2);
}

html.theme-lachurches .browse-fallback a:hover {
    color: var(--lac-gold-deep);
}

/* ── Filters ────────────────────────────────────────────────────── */

html.theme-lachurches .filters-bar {
    background: var(--lac-bg-warm);
    border: 1px solid var(--lac-rule);
}

html.theme-lachurches .filter-chip-group label {
    font-family: var(--lac-display);
    color: var(--lac-ink-2);
}

html.theme-lachurches .chip {
    background: var(--lac-bg);
    border: 1px solid var(--lac-rule);
    color: var(--lac-ink-2);
}

html.theme-lachurches .chip:hover {
    border-color: var(--lac-gold);
    color: var(--lac-ink);
}

html.theme-lachurches .chip.active {
    background: var(--lac-ink);
    border-color: var(--lac-ink);
    color: var(--lac-bg);
}

html.theme-lachurches .distance-value {
    color: var(--lac-gold-deep);
}

/* ── Hero answer ────────────────────────────────────────────────── */

html.theme-lachurches .answer-box {
    background: var(--lac-bg-warm);
    border: 1px solid var(--lac-rule);
}

html.theme-lachurches .answer-title {
    font-family: var(--lac-display);
}

/* ── Results ────────────────────────────────────────────────────── */

html.theme-lachurches .church-card {
    background: var(--lac-bg-warm);
    border: 1px solid var(--lac-rule);
}

html.theme-lachurches .church-card:hover {
    background: var(--lac-bg-warm);
    border-color: var(--lac-gold);
}

html.theme-lachurches .church-card.no {
    opacity: 0.75;
}

/* ── Newsletter ─────────────────────────────────────────────────── */

html.theme-lachurches .newsletter-box {
    background: var(--lac-bg-warm);
    border: 1px solid var(--lac-rule);
}

html.theme-lachurches .newsletter-box h2 {
    font-family: var(--lac-display);
    color: var(--lac-ink);
}

html.theme-lachurches .newsletter-form input {
    background: var(--lac-bg);
    border: 1px solid var(--lac-rule);
    color: var(--lac-ink);
}

html.theme-lachurches .newsletter-form input:focus {
    border-color: var(--lac-gold);
    box-shadow: none;
}

html.theme-lachurches .newsletter-form button {
    background: var(--lac-ink);
    color: var(--lac-bg);
    font-family: var(--lac-display);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

html.theme-lachurches .newsletter-form button:hover {
    background: var(--lac-gold-deep);
    transform: none;
    box-shadow: none;
}

/* ── Mini map ───────────────────────────────────────────────────── */

html.theme-lachurches .finder-mini-map {
    border: 1px solid var(--lac-rule);
    border-radius: var(--lac-radius-sm, 6px);
}
