/*
 * pat-fi-shortcodes.css - dedicated CSS for [f2f-interview].
 *
 * v1.38.10: self-contained card CSS. The pilotaptitudetest.com theme
 * only ships styling for .activity_prog_type_container on pages
 * where a PRVI shortcode is also present; pages with F2F cards but
 * no PRVI cards get no theme card rules, and the F2F cards render
 * unstyled. Fixed here by targeting the f2f-* hint classes we
 * already emit alongside each theme class, with rules that fully
 * reproduce the PRVI card layout. Now cards render correctly whether
 * or not the theme's rules are on the page.
 *
 * Selector specificity strategy
 * -----------------------------
 * Every card is emitted inside .f2f-catalogue (single-pack renders,
 * stacked lists, and Variant 2 airline groups all carry this class
 * on their outer wrapper). Rules below use .f2f-catalogue .f2f-*
 * so specificity beats any theme rule targeting .activity_* directly
 * - two class selectors (0-2-0) beats one (0-1-0). No !important
 * needed for structural rules; a couple of layout rules use it
 * defensively to survive theme overrides that also use two selectors.
 *
 * What lives here
 *   1. Self-contained card layout (.f2f-activity-*, .f2f-catalogue)
 *      NEW in v1.38.10 - previously relied on theme CSS.
 *   2. Variant 2 airline group wrapper (.pat-fi-airline-*)
 *      Unchanged from v1.38.4.
 *   3. Login and empty-state utility classes.
 *
 * Loaded conditionally by PAT_FI_Shortcodes::maybe_enqueue_styles()
 * via has_shortcode() on wp_enqueue_scripts, with a safety-net
 * wp_enqueue_style() call inside render() for widgets / block
 * patterns / do_shortcode() callers.
 */


/* ================================================================
 *   Self-contained card layout (Variant 1 and inside Variant 2)
 * ================================================================ */

/* v1.38.48: THE CARD IS THE THEME'S, NOT OURS.
   Lines 41-278 of the previous version re-styled every part of the
   activity card (with !important throughout) and painted their own
   "Claude" ribbon with a Unicode star. That is why the Face-to-Face cards
   never quite matched the PRVI cards beside them, which the theme styles
   from the same .prvi-catalogue / .activity_prog_type markup, ribbon and
   Claude logo included. Those rules are gone; the markup is identical to
   PRVI's and the theme draws it. Only the airline group header and the
   login prompt, which have no theme equivalent, are styled here. */

/* ---------- The "Receive analysis powered by Claude" ribbon (v1.38.56) ----------
   Our own copy of the theme's .activity_title.sup_prvi rules, including the
   breakpoints, so the FTF card no longer depends on that theme class. The
   element keeps .activity_title (as PRVI's ribbon does) so the theme's base
   title sizing applies beneath these, exactly as it does for PRVI. */
.activity_prog_type .activity_title.f2f-card-ribbon {
    background-color: #f9e8e3 !important;
    border-bottom: 1px solid #e9d8d3;
    padding: 4px 10px 3px 0 !important;
    color: #222;
    font-weight: 500;
    font-size: 1em;
    font-family: 'Inter';
    margin-bottom: 0;
    max-width: unset !important;
    margin-left: 0 !important;
    text-align: right;
}
.activity_prog_type .activity_title.f2f-card-ribbon .f2f-card-ribbon-logo {
    display: inline;
    height: 16px;
    vertical-align: text-top;
    padding-left: 3px;
}
@media only screen and (max-width: 1050px) {
    .activity_prog_type .activity_title.f2f-card-ribbon {font-size: 14px !important;padding-right: 6px !important;}
    .activity_prog_type .activity_title.f2f-card-ribbon .f2f-card-ribbon-logo {height: 16px;}
}
@media only screen and (max-width: 900px) {
    .activity_prog_type .activity_title.f2f-card-ribbon {font-size: 12px !important;}
    .activity_prog_type .activity_title.f2f-card-ribbon .f2f-card-ribbon-logo {height: 14px;vertical-align: -2px;}
}
@media only screen and (max-width: 770px) {
    .activity_prog_type .activity_title.f2f-card-ribbon {
        overflow: unset !important; max-width: unset !important;
        text-overflow: unset !important; white-space: unset !important;
    }
    .f2f-card-title-main {font-size: 17px !important}
    .f2f-card-title-pack {font-size:  16px !important;}
}

/* ---------- The Face-to-Face card (v1.38.50) ----------
   The card itself (square, ribbon, title, sizes, breakpoints) is the theme's
   PRVI card, untouched. These rules only fill the image square: the pack's
   header photo at 30%, a brand-colour wash from the left, the tail
   bottom-left. --f2f-brand is set per card. The theme sizes every <img> in
   .activity_img to height:100%, hence the overrides here. */
.activity_prog_type .activity_img.f2f-card-img {
    position: relative;
    overflow: hidden;
    /* Opaque white behind the 30% photo. The square is floated, so the
       ribbon and title flow underneath it; without this the pink ribbon
       showed through the photo. The brand tint comes back via the wash. */
    background: #fff !important;
    z-index: 1;
}
.activity_prog_type .activity_img .f2f-card-tint {
    position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    background: var(--f2f-tint, transparent);
}
.activity_prog_type .activity_img .f2f-card-photo {
    position: absolute; left: 0; top: 0;
    width: 100% !important; height: 100% !important;
    object-fit: cover;
    opacity: 0.30;
    border-radius: 0;
}
.activity_prog_type .activity_img .f2f-card-wash {
    position: absolute; left: 0; top: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, color-mix(in srgb, var(--f2f-brand, #1b3548) 18%, transparent), transparent);
    pointer-events: none;
}
.activity_prog_type .activity_img .f2f-card-tail {
    position: absolute;
    left: 0px;
    bottom: var(--f2f-tail-bottom, 5px);
    height: var(--f2f-tail-h, 87%) !important;
    width: auto !important;
    max-width: 92%;
    object-fit: contain;
    object-position: left bottom;
    border-radius: 0;
}

/* ---------- Venue band (v1.38.58) ----------
   For packs held at a partner venue. Sits across the TOP of the image
   square, in the card's brand colour, and copies the ribbon's font size,
   padding, border and breakpoints so the two read as one band across the
   card. --f2f-band-lh is the only free value: the theme sets the ribbon's
   line-height through .activity_title, which the band does not carry, so
   if the band lands a pixel taller or shorter than the ribbon, set it here.
   On these cards the tail is shrunk (--f2f-tail-h) to stay clear of the
   band; raise or lower the value in .f2f-card-has-band to taste. */
.activity_prog_type .activity_img.f2f-card-has-band {
    --f2f-tail-h: 72%;          /* was 87%: leaves room under the band */
    --f2f-tail-bottom: 5px;
    --f2f-band-lh: 1.5;
}
.activity_prog_type .activity_img .f2f-card-band {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    z-index: 3;
    box-sizing: border-box;
    padding: 5px 8px 6px 8px;         
    border-bottom: 1px solid rgba(0,0,0,.12); /* ribbon: 1px solid #e9d8d3 */
    background: var(--f2f-brand, #1b3548);
    color: #fff;
    font-family: 'Inter';
    font-size: 1em;
    font-weight: 500;
    line-height: var(--f2f-band-lh, 1.5);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0;
}
@media only screen and (max-width: 1050px) {
    .activity_prog_type .activity_img .f2f-card-band {font-size: 14px !important; padding-left: 6px; padding-right: 6px;}
    .activity_prog_type .activity_img .f2f-card-band {padding: 6px 8px 4px 8px;}
}
@media only screen and (max-width: 900px) {
    .activity_prog_type .activity_img .f2f-card-band {font-size: 12px !important;}
}
.activity_prog_type .activity_img .f2f-card-initials {
    position: absolute; left: 14px; bottom: 12px;
    font: 500 28px/1 'Open Sans', Arial, sans-serif;
    color: var(--f2f-brand, #1b3548); opacity: 0.55;
}

/* ================================================================
 *   Variant 2 - Airline group  (unchanged from v1.38.4)
 * ================================================================ */

.pat-fi-airline-group {
    --pat-fi-radius:    12px;
    --pat-fi-radius-sm: 8px;
    --pat-fi-border:    #e0e0dc;
    --pat-fi-surface:   #ffffff;
    --pat-fi-surface-2: #fafaf7;

    border: 0.5px solid var(--pat-fi-border);
    border-radius: var(--pat-fi-radius);
    overflow: hidden;
    background: var(--pat-fi-surface);
    margin: 1.5em 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
}
.pat-fi-airline-group *,
.pat-fi-airline-group *::before,
.pat-fi-airline-group *::after {
    box-sizing: inherit;
}

.pat-fi-airline-header {
    background: var(--pat-fi-brand, #1b3548);
    color: #ffffff;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pat-fi-airline-badge {
    flex: 0 0 52px;
    width: 52px;
    height: 48px;
    background: #ffffff;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pat-fi-airline-tail {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.pat-fi-airline-tail-fallback {
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    color: var(--pat-fi-brand, #1b3548);
}

.pat-fi-airline-heading {
    min-width: 0;
    flex: 1;
}
.pat-fi-airline-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: #ffffff;
    margin: 0;
}
.pat-fi-airline-count {
    font-size: 12px;
    line-height: 1.3;
    opacity: 0.8;
    margin-top: 2px;
    color: #ffffff;
}


/* ================================================================
 *   Login and empty states  (unchanged from v1.38.4)
 * ================================================================ */

.pat-fi-login-prompt {
    padding: 16px 18px;
    background: #fafaf7;
    border: 0.5px solid #e0e0dc;
    border-radius: 12px;
    color: #666;
    font-size: 14px;
    margin: 1.5em 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
}
.pat-fi-login-prompt a {
    color: inherit;
    text-decoration: underline;
}

.pat-fi-shortcode-empty {
    padding: 12px 16px;
    color: #666;
    font-size: 13px;
    font-style: italic;
}