/**
 * Guide modal — extends the base .btc-modal classes from btc-contact-modal.css.
 * V3 "Sylva Ethos" design tokens.
 *
 * Note: many selectors are scoped under .entry-content to beat Astra's
 * default button/heading rules inside post content. The modal markup
 * itself renders in wp_footer (outside .entry-content) but the card
 * triggers live inside it.
 */

/* ── Card trigger affordance ─────────────────────────────────────── */

.entry-content .btc-guide-card-trigger,
.entry-content .btc-guide-card-trigger:hover,
.entry-content .btc-guide-card-trigger:focus,
.entry-content .btc-guide-card-trigger:active {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: background-color 0.2s;
}

.entry-content .btc-guide-card-trigger:focus-visible {
    outline: 2px solid var(--btc-secondary);
    outline-offset: 2px;
}

/* Subtle olive tint on hover — V3 tonal shift, fully opaque feel */
.entry-content .btc-guide-card-trigger:hover > .btc-guide-card,
.entry-content .btc-guide-card-trigger:focus-visible > .btc-guide-card {
    background-color: #EEF0E6;
}

/* Inner card fills the button so the (transparent) button bg never peeks out */
.entry-content .btc-guide-card-trigger > .btc-guide-card {
    height: 100%;
    transition: background-color 0.2s;
}

/* ── Modal viewport coverage (push below WP admin bar when logged in) ─ */

.btc-modal--guide {
    z-index: 100000;            /* one above WP admin bar (#wpadminbar is 99999) */
}

body.admin-bar .btc-modal--guide {
    top: 32px;                  /* WP admin bar height on desktop */
}
@media (max-width: 782px) {
    body.admin-bar .btc-modal--guide {
        top: 46px;              /* WP admin bar height on mobile */
    }
}

/* Robust full-screen backdrop (position:fixed so it covers regardless
   of any positioned ancestor) */
.btc-modal--guide .btc-modal__backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(2, 18, 4, 0.7);
}

/* ── Modal dialog: wider for two-column layout, with cap on tall content ─ */

.btc-modal__dialog--guide {
    max-width: 880px;
    width: calc(100% - 2rem);   /* small gutter on narrow screens */
    max-height: calc(100vh - 4rem);
}

@media (max-width: 600px) {
    .btc-modal__dialog--guide {
        max-height: calc(100vh - 5rem);
    }
}

/* ── Modal close button (override Astra's .entry-content button blue) ─ */

.btc-modal--guide .btc-modal__close,
.btc-modal--guide .btc-modal__close:hover,
.btc-modal--guide .btc-modal__close:focus,
.btc-modal--guide .btc-modal__close:active {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--btc-on-primary);
    font-size: 1.75rem;
    line-height: 1;
    padding: 0 0.25rem;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.btc-modal--guide .btc-modal__close:hover {
    opacity: 1;
}

/* ── Modal header title (force light color over dark green header) ── */

.btc-modal--guide .btc-modal__header h3 {
    color: var(--btc-on-primary);
    margin: 0;
    font-family: var(--btc-font-sans);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 400;
}

/* ── Modal body: photo + text grid ───────────────────────────────── */

.btc-guide-modal__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding: 2.5rem 2rem;
}

@media (min-width: 768px) {
    .btc-guide-modal__body {
        /* 2fr:3fr = 40%:60% ratio applied to space remaining AFTER gap is
           reserved (using % would overflow because % + gap > 100%). */
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        gap: 2.5rem;
        padding: 2.5rem;
    }
}

.btc-guide-modal__image {
    margin: 0;
}
.btc-guide-modal__image img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.4s;
}
.btc-guide-modal__image img:hover {
    filter: grayscale(0%);
}

.btc-guide-modal__text {
    font-family: var(--btc-font-serif);
    color: var(--btc-on-surface);
    min-width: 0;       /* allow text to wrap inside grid cell */
}

.btc-guide-modal__region {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--btc-font-sans);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: var(--btc-secondary);
    margin: 0 0 1.5rem;
}
.btc-guide-modal__region .material-symbols-outlined {
    font-size: 1rem;
}

.btc-guide-modal__bio {
    line-height: 1.7;
}
.btc-guide-modal__bio p {
    margin: 0 0 1rem;
}
.btc-guide-modal__bio p:last-child {
    margin-bottom: 0;
}
