/**
 * Private Training booking widget styles.
 *
 * Loaded AFTER booking.css and inherits its tokens (--tfa-primary etc), so the
 * widget stays visually part of the site instead of a second design language.
 * Scoped under #tfa-pt-app so nothing here can leak into the bachelor wizard,
 * which is the live revenue path.
 *
 * Design brief (Ron, 2026-08-08): photo per discipline, no blurbs, the long
 * range note much larger and highlighted, and more breathing room top/bottom.
 */

#tfa-pt-app {
    /* Generous room BELOW, tight above (Ron, 2026-08-08). The widget is embedded
       under a "Book a Single Session" heading on the firearms page, so a big top
       pad left the heading marooned from the thing it introduces. */
    padding: clamp(12px, 1.6vw, 22px) 0 clamp(56px, 8vw, 112px);
    max-width: 1080px;
    margin: 0 auto;
}

/* Centre the heading/intro that INTRODUCE the widget. CSS has no previous-sibling
   combinator, so this uses :has(). The block itself is also set to centred in the
   page content, so alignment does not depend on :has() support. */
:has(+ #tfa-pt-app) { text-align: center; }

/* ── Step rail ─────────────────────────────────────────────── */
#tfa-pt-app .tfa-steps { margin-bottom: clamp(32px, 5vw, 56px); }

#tfa-pt-app .tfa-heading {
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    letter-spacing: 0.02em;
    margin: 0 0 clamp(28px, 4vw, 44px);
    text-align: center;
}

/* ── Focus cards: the photo does the talking ───────────────── */
#tfa-pt-app .tfa-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(16px, 2.4vw, 26px);
}

#tfa-pt-app .tfa-pt-focus-card {
    position: relative;
    padding: 0;
    border: 2px solid var(--tfa-border);
    border-radius: var(--tfa-radius-lg);
    background: var(--tfa-surface);
    overflow: hidden;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

#tfa-pt-app .tfa-pt-focus-card:hover,
#tfa-pt-app .tfa-pt-focus-card:focus-visible {
    border-color: var(--tfa-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
    outline: none;
}

#tfa-pt-app .tfa-pt-focus-card.selected {
    border-color: var(--tfa-primary);
    box-shadow: 0 0 0 3px rgba(200, 169, 78, .28);
}

#tfa-pt-app .tfa-pt-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #000;
}

#tfa-pt-app .tfa-pt-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

#tfa-pt-app .tfa-pt-focus-card:hover .tfa-pt-card-media img { transform: scale(1.06); }

/* Legibility floor for the label regardless of the photo underneath. */
#tfa-pt-app .tfa-pt-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.10) 35%, rgba(0,0,0,.82) 100%);
}

#tfa-pt-app .tfa-pt-card-label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 16px 18px;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

#tfa-pt-app .tfa-pt-focus-card.selected .tfa-pt-card-label { color: var(--tfa-primary); }

#tfa-pt-app .tfa-pt-check {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 3;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--tfa-primary);
    color: #111;
    font-size: 17px;
    font-weight: 700;
    line-height: 30px;
    text-align: center;
    opacity: 0;
    transform: scale(.7);
    transition: opacity .18s ease, transform .18s ease;
}
#tfa-pt-app .tfa-pt-focus-card.selected .tfa-pt-check { opacity: 1; transform: scale(1); }

/* ── Long range callout: deliberately loud ─────────────────── */
#tfa-pt-app .tfa-pt-longrange {
    margin: clamp(30px, 4.5vw, 48px) 0 0;
    padding: clamp(22px, 3vw, 30px) clamp(22px, 3vw, 34px);
    background: linear-gradient(180deg, rgba(200,169,78,.13), rgba(200,169,78,.06));
    border: 2px solid var(--tfa-primary);
    border-radius: var(--tfa-radius-lg);
    text-align: center;
}

#tfa-pt-app .tfa-pt-longrange-title {
    display: block;
    font-size: clamp(1.25rem, 2.5vw, 1.7rem);
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tfa-primary);
    margin-bottom: 10px;
}

#tfa-pt-app .tfa-pt-longrange-body {
    font-size: clamp(1.02rem, 1.6vw, 1.18rem);
    line-height: 1.6;
    color: var(--tfa-text);
    margin: 0;
}

#tfa-pt-app .tfa-pt-longrange-body a,
#tfa-pt-app .tfa-pt-longrange-phone {
    color: var(--tfa-primary);
    font-weight: 700;
    white-space: nowrap;
}

/* ── Everything below step 1 ───────────────────────────────── */
#tfa-pt-app .tfa-selected-package-bar,
#tfa-pt-app .tfa-summary-bar {
    font-size: 1.05rem;
    padding: 16px 20px;
    margin-bottom: clamp(22px, 3vw, 32px);
    border-left: 3px solid var(--tfa-primary);
}

#tfa-pt-app .tfa-form-row { margin-bottom: 22px; }
#tfa-pt-app .tfa-terms-box { padding: clamp(20px, 3vw, 28px); }
#tfa-pt-app .tfa-terms-box ul { margin: 12px 0 18px; }
#tfa-pt-app .tfa-terms-box li { margin-bottom: 8px; line-height: 1.55; }

#tfa-pt-app .tfa-submit-btn {
    padding: 18px 24px;
    font-size: 1.12rem;
    letter-spacing: .04em;
}

@media (max-width: 640px) {
    #tfa-pt-app .tfa-packages { grid-template-columns: 1fr; }
    #tfa-pt-app .tfa-pt-card-media { aspect-ratio: 16 / 9; }
}


/* ── Mobile ────────────────────────────────────────────────────
   Checked at 375px. The card grid already collapses to one column;
   these keep type and spacing sane and guarantee no sideways scroll. */
@media (max-width: 600px) {
    #tfa-pt-app {
        padding: clamp(10px, 3vw, 18px) 0 clamp(40px, 10vw, 64px);
        overflow-x: hidden;
    }
    #tfa-pt-app .tfa-heading { font-size: 1.45rem; margin-bottom: 22px; }
    #tfa-pt-app .tfa-pt-longrange { padding: 18px 16px; margin-top: 24px; }
    #tfa-pt-app .tfa-pt-longrange-title { font-size: 1.15rem; }
    #tfa-pt-app .tfa-pt-longrange-body { font-size: 1rem; }
    /* A long phone number should never be the thing that widens the page. */
    #tfa-pt-app .tfa-pt-longrange-phone { white-space: normal; }
    #tfa-pt-app .tfa-pt-card-label { font-size: 1.1rem; padding: 12px 14px; }
    #tfa-pt-app .tfa-terms-box { padding: 16px 14px; }
    #tfa-pt-app .tfa-submit-btn { padding: 16px 18px; font-size: 1.02rem; }
}
