/*
 * Student application form v2: styles for the presentation layer
 * (saf-v2-enhance.js). Loads after host-application-form.css and
 * student-application-form.css and only adds to them. Solid palette colours
 * only, no gradients (style guide rule).
 *
 * @since 2026-10-16
 */

.saf-v2 {
    --v2-pill-h: 44px;
}

/* Native control kept for the logic, hidden from sight and from screen readers
   (the pills/cards carry the semantics). Not display:none, so the field's
   validation still runs. */
.saf-v2 .saf-v2-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}
.saf-v2 .haf-field { position: relative; }

/* iOS zooms in on focus below 16px */
.saf-v2 .haf-input,
.saf-v2 .haf-select,
.saf-v2 .haf-textarea { font-size: 16px; }

/* ---------- Tap buttons ---------- */
.saf-v2-pills--buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.saf-v2-pill {
    min-height: var(--v2-pill-h);
    padding: 10px 16px;
    border: 1.5px solid var(--haf-grey-300);
    border-radius: 999px;
    background: var(--haf-white);
    color: var(--haf-grey-800);
    font: inherit;
    font-size: 15px;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--haf-transition), background var(--haf-transition);
}
.saf-v2-pill:hover { border-color: var(--haf-blue); background: var(--haf-blue-light); color: var(--haf-navy); }
.saf-v2-pill:focus-visible,
.saf-v2-card:focus-visible { outline: 3px solid var(--haf-blue); outline-offset: 2px; }
.saf-v2-pill.is-selected {
    border-color: var(--haf-magenta);
    background: var(--haf-magenta-light);
    color: var(--haf-navy);
    font-weight: 600;
}
.has-error .saf-v2-pill,
.has-error .saf-v2-card { border-color: var(--haf-red); }

/* Checkbox / radio groups shown as pills (meal plan, private bathroom) */
.saf-v2-pills.haf-checkbox-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}
.saf-v2-pills .haf-checkbox-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: var(--v2-pill-h);
    margin: 0;
    padding: 10px 16px;
    border: 1.5px solid var(--haf-grey-300);
    border-radius: var(--haf-radius-lg);
    background: var(--haf-white);
    cursor: pointer;
    flex: 1 1 calc(50% - 8px);
    box-sizing: border-box;
}
.saf-v2-pills--stack .haf-checkbox-item { flex-basis: 100%; }
.saf-v2-pills .haf-checkbox-item input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.saf-v2-pills .haf-checkbox-item:focus-within { outline: 3px solid var(--haf-blue); outline-offset: 2px; }
.saf-v2-pills .haf-checkbox-item.is-selected {
    border-color: var(--haf-magenta);
    background: var(--haf-magenta-light);
}
.saf-v2-pills .haf-checkbox-item.is-selected span { font-weight: 600; color: var(--haf-navy); }
.saf-v2-pill__price {
    margin-left: auto;
    padding-left: 8px;
    color: var(--haf-magenta);
    font-weight: 700;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .saf-v2-pills .haf-checkbox-item { flex-basis: 100%; }
}

/* ---------- Category cards ---------- */
.saf-v2-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}
.saf-v2-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1.5px solid var(--haf-grey-300);
    border-radius: var(--haf-radius-lg);
    background: var(--haf-white);
    color: var(--haf-grey-800);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color var(--haf-transition), background var(--haf-transition);
}
.saf-v2-card:hover { border-color: var(--haf-blue); background: var(--haf-blue-light); }
.saf-v2-card.is-selected {
    border-color: var(--haf-magenta);
    background: var(--haf-magenta-light);
    box-shadow: 0 0 0 1px var(--haf-magenta);
}
.saf-v2-card__name { font-weight: 700; color: var(--haf-navy); font-size: 16px; }
.saf-v2-card__text { font-size: 14px; color: var(--haf-grey-600); line-height: 1.4; }
.saf-v2-card__price { font-size: 15px; font-weight: 700; color: var(--haf-magenta); min-height: 1.2em; }
.saf-v2-card--help { border-style: dashed; grid-column: 1 / -1; }
.saf-v2-card--help .saf-v2-card__price { display: none; }

/* ---------- Links, notes, trust ---------- */
.saf-v2-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--haf-blue);
    font: inherit;
    font-size: 15px;
    text-decoration: underline;
    cursor: pointer;
}
.saf-v2-link:hover { color: var(--haf-navy); }
#safHowManyField:not(.is-open) .saf-v2-pills--buttons,
#safHowManyField:not(.is-open) .haf-field__label { display: none; }
.saf-v2-trust { margin: 12px 0 0; font-size: 13px; color: var(--haf-grey-600); text-align: center; }
.saf-v2-recaptcha-note { margin: 12px 0 0; font-size: 12px; color: var(--haf-grey-500); text-align: center; }
.saf-v2-recaptcha-note a { color: inherit; }
.saf-v2-note p { line-height: 1.45; }

/* Google allows hiding the badge when the notice above is shown */
.grecaptcha-badge { visibility: hidden !important; }

/* Screen-reader-only alert */
.saf-v2-sr-alert {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Restored-draft notice */
.saf-v2-draft {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: var(--haf-radius);
    background: var(--haf-green-light);
    color: var(--haf-grey-800);
    font-size: 14px;
}
.saf-v2-draft[hidden] { display: none; }

/* ---------- Sticky price bar (phones) ---------- */
.saf-v2-pricebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--haf-navy);
    color: var(--haf-white);
    font-size: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
}
.saf-v2-pricebar[hidden] { display: none; }
.saf-v2-pricebar strong { font-size: 18px; }
.saf-v2-pricebar__label { opacity: 0.8; }
.saf-v2-pricebar #safPriceBarWeeks { opacity: 0.8; font-size: 13px; }
.saf-v2-pricebar .saf-v2-link { color: var(--haf-white); }
.saf-v2-pricebar .saf-v2-link:hover { color: var(--haf-gold); }
@media (min-width: 900px) {
    .saf-v2-pricebar { display: none !important; }
}

/* Duration buttons (how long) */
.saf-v2 .haf-field[hidden] { display: none !important; }
.saf-v2-duration { margin-top: 16px; }
.saf-v2-duration .haf-field { margin-top: 12px; }
.saf-v2-shortstay-tag { font-size: 13px; padding-left: 6px; }
.saf-v2-shortstay { margin: 8px 0 0; color: var(--haf-grey-700); }
.saf-v2-shortstay[hidden] { display: none; }
.saf-v2-change-end { margin-top: 8px; font-size: 14px; }
.saf-v2-change-end[hidden] { display: none; }

/* Inside the WP theme: theme button rules square the corners and change the
   font; pin them for the v2 controls. */
.saf-v2 button.saf-v2-pill { border-radius: 999px !important; font-family: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; }
.saf-v2 button.saf-v2-card { border-radius: var(--haf-radius-lg) !important; font-family: inherit; text-transform: none; letter-spacing: normal; box-shadow: none; }
.saf-v2 button.saf-v2-card.is-selected { box-shadow: 0 0 0 1px var(--haf-magenta); }
.saf-v2 button.saf-v2-link { background: none !important; border: 0 !important; padding: 0 !important; box-shadow: none; text-transform: none; }

/* Multi-select pills (purpose of visit): size to the text */
.saf-v2-pills--multi .haf-checkbox-item { flex: 0 1 auto !important; width: auto; border-radius: 999px; }
.saf-v2-pills--multi .haf-checkbox-item.is-selected span::before { content: "\2713\00a0"; color: var(--haf-magenta); font-weight: 700; }

/* Toggle switch (an on/off option, never a Yes/No question) */
.saf-v2-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1.4;
}
.saf-v2-switch input {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    position: relative;
    width: 46px;
    height: 28px;
    margin: 0;
    border-radius: 999px;
    background: var(--haf-grey-300);
    cursor: pointer;
    transition: background var(--haf-transition);
}
.saf-v2-switch input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--haf-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform var(--haf-transition);
}
.saf-v2-switch input:checked { background: var(--haf-magenta); }
.saf-v2-switch input:checked::after { transform: translateX(18px); }
.saf-v2-switch input:focus-visible { outline: 3px solid var(--haf-blue); outline-offset: 2px; }
.saf-v2-arrival-age { display: block; margin-top: 6px; color: var(--haf-navy); font-weight: 600; }
.saf-v2-arrival-age:empty { display: none; }

/* =====================================================================
   Text roles (Steve, 2026-10-16): each kind of text looks different.
   Question = navy bold · Answer = near-black · Help = grey small ·
   Live info = blue chip · Cost = amber chip · Error = red · Price = magenta.
   ===================================================================== */
.saf-v2 .haf-field__label { color: var(--haf-navy); font-weight: 700; }
.saf-v2 .haf-input,
.saf-v2 .haf-select,
.saf-v2 .haf-textarea { color: var(--haf-grey-800); }
.saf-v2 .haf-input::placeholder,
.saf-v2 .haf-textarea::placeholder { color: var(--haf-grey-400); }
.saf-v2 .haf-field__hint { color: var(--haf-grey-600); font-weight: 400; }

.saf-v2 .saf-v2-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0 0;
    padding: 8px 12px;
    border-radius: var(--haf-radius);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}
.saf-v2 .saf-v2-msg::before {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    color: var(--haf-white);
}
.saf-v2 .saf-v2-msg:empty,
.saf-v2 .saf-v2-msg[hidden] { display: none !important; }
.saf-v2 .saf-v2-msg p { margin: 0; font-size: inherit; }

/* Live info: computed from the student's answers (age on arrival, dates) */
.saf-v2 .saf-v2-msg--info { background: #eaf5fc; color: #155e8c; }
.saf-v2 .saf-v2-msg--info::before { content: "i"; background: var(--haf-blue); font-family: Georgia, serif; font-style: italic; }

/* Cost: something that changes the price */
.saf-v2 .saf-v2-msg--cost { background: #fdf3e2; color: #7a4f05; }
.saf-v2 .saf-v2-msg--cost::before { content: "\00a3"; background: var(--haf-gold); }

/* Older info panels inside v2 keep their layout but pick up the same colours */
.saf-v2 .haf-info[style*="haf-blue"] { background: #eaf5fc; color: #155e8c; }
.saf-v2 .haf-info[style*="haf-gold"],
.saf-v2 #under18Notice .haf-info { background: #fdf3e2; color: #7a4f05; }
.saf-v2 .saf-v2-msg::before { display: inline-block; }
/* saf-v2.js writes display:block on the date summary; keep the chip layout */
.saf-v2 #safDateSummary.saf-v2-msg:not(:empty) { display: flex !important; margin-top: 10px !important; }

/* =====================================================================
   PREMIUM LAYER (2026-10-16): calm surface, clear type scale, one choice
   language, magenta CTA, sticky summary. Overrides the shared v1 styles
   for .saf-v2 only, so the v1 forms are untouched. Solid colours only.
   ===================================================================== */
.saf-v2 {
    --v2-ink: #0f1b3d;
    --v2-line: #e3e7ee;
    --v2-line-strong: #c9d0db;
    --v2-surface: #ffffff;
    --v2-sel-bg: #fdf1f7;
    --v2-radius: 14px;
    --v2-focus: 0 0 0 4px rgba(192, 38, 126, 0.16);
    color: var(--v2-ink);
    max-width: 760px;
}

/* ---------- Progress: numbered stepper ---------- */
.saf-v2 .haf-progress { display: none; }
.saf-v2 .haf-progress__labels {
    display: flex !important;
    gap: 6px;
    margin: 0 0 28px;
    counter-reset: v2step;
}
.saf-v2 .haf-progress__label {
    counter-increment: v2step;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 10px;
    border-bottom: 3px solid var(--v2-line);
    font-size: 13px;
    font-weight: 600;
    color: var(--haf-grey-500);
    text-align: left;
    overflow: hidden;
}
.saf-v2 .haf-progress__label::before {
    content: counter(v2step);
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--v2-line);
    color: var(--haf-grey-600);
    font-size: 12px;
    font-weight: 700;
}
.saf-v2 .haf-progress__label.is-active { color: var(--v2-ink); border-bottom-color: var(--haf-magenta); }
.saf-v2 .haf-progress__label.is-active::before { background: var(--haf-magenta); color: #fff; }
.saf-v2 .haf-progress__label.is-complete { color: var(--haf-grey-600); border-bottom-color: var(--v2-ink); }
.saf-v2 .haf-progress__label.is-complete::before { content: "\2713"; background: var(--v2-ink); color: #fff; }
@media (max-width: 600px) {
    .saf-v2 .haf-progress__label { font-size: 0; gap: 0; justify-content: center; }
    .saf-v2 .haf-progress__label.is-active { font-size: 13px; gap: 8px; flex-grow: 3; justify-content: flex-start; }
}

/* ---------- Step surface + type scale ---------- */
.saf-v2 .haf-step.is-active {
    background: var(--v2-surface);
    border: 1px solid var(--v2-line);
    border-radius: 20px;
    padding: 32px 36px 28px;
    box-shadow: 0 1px 2px rgba(15, 27, 61, 0.04), 0 8px 24px rgba(15, 27, 61, 0.06);
}
.saf-v2 .haf-step__header { margin-bottom: 28px; }
.saf-v2 .haf-step__counter {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--haf-magenta);
}
.saf-v2 .haf-step__title { font-size: 28px; line-height: 1.2; letter-spacing: -0.01em; color: var(--v2-ink); margin: 0 0 6px; }
.saf-v2 .haf-step__subtitle { font-size: 15px; color: var(--haf-grey-600); }

.saf-v2 .haf-section {
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0 0 32px;
}
.saf-v2 .haf-section + .haf-section,
.saf-v2 .saf-pricing-card + .haf-section { border-top: 1px solid var(--v2-line); padding-top: 28px; }
.saf-v2 .haf-section__title {
    border: 0;
    padding: 0;
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
    color: var(--v2-ink);
}
.saf-v2 .haf-field { margin-bottom: 22px; }
.saf-v2 .haf-field__label { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.saf-v2 .haf-required { color: var(--haf-magenta); }
@media (max-width: 600px) {
    .saf-v2 .haf-step.is-active { padding: 22px 18px 20px; border-radius: 16px; }
    .saf-v2 .haf-step__title { font-size: 24px; }
}

/* ---------- Inputs ---------- */
.saf-v2 .haf-input,
.saf-v2 .haf-select,
.saf-v2 .haf-textarea {
    min-height: 52px;
    padding: 12px 16px;
    border: 1.5px solid var(--v2-line-strong);
    border-radius: 12px;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.saf-v2 .haf-textarea { min-height: 110px; }
.saf-v2 .haf-input:hover,
.saf-v2 .haf-select:hover,
.saf-v2 .haf-textarea:hover { border-color: #aab3c2; }
.saf-v2 .haf-input:focus,
.saf-v2 .haf-select:focus,
.saf-v2 .haf-textarea:focus { outline: none; border-color: var(--haf-magenta); box-shadow: var(--v2-focus); }
.saf-v2 .haf-field.has-error .haf-input,
.saf-v2 .haf-field.has-error .haf-select { border-color: var(--haf-red); }

/* ---------- Choices: segmented control ---------- */
.saf-v2 .saf-v2-seg {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    padding: 4px;
    border-radius: 14px;
    background: #eef1f5;
}
.saf-v2 .saf-v2-seg .saf-v2-pill,
.saf-v2 .saf-v2-seg .haf-checkbox-item {
    min-height: 44px;
    min-width: 72px;
    margin: 0;
    padding: 10px 20px;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent;
    color: var(--haf-grey-700);
    font-size: 15px;
    font-weight: 600;
    justify-content: center;
    text-align: center;
}
.saf-v2 .saf-v2-seg .saf-v2-pill:hover,
.saf-v2 .saf-v2-seg .haf-checkbox-item:hover { background: rgba(255, 255, 255, 0.6); color: var(--v2-ink); }
.saf-v2 .saf-v2-seg .saf-v2-pill.is-selected,
.saf-v2 .saf-v2-seg .haf-checkbox-item.is-selected {
    background: #fff;
    color: var(--haf-magenta);
    box-shadow: 0 1px 3px rgba(15, 27, 61, 0.12), 0 0 0 1.5px var(--haf-magenta);
}
.saf-v2 .saf-v2-seg--radio .haf-checkbox-item { display: inline-flex; align-items: center; cursor: pointer; }
.saf-v2 .saf-v2-seg--radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.saf-v2 .saf-v2-seg--radio .haf-checkbox-item:focus-within { outline: 3px solid var(--haf-blue); outline-offset: 1px; }

/* ---------- Choices: tiles (radio dot) ---------- */
.saf-v2 .saf-v2-tiles { display: grid !important; grid-template-columns: 1fr; gap: 8px !important; }
.saf-v2 .saf-v2-tiles--grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.saf-v2 .saf-v2-tiles .saf-v2-pill,
.saf-v2 .saf-v2-pills--stack .haf-checkbox-item,
.saf-v2 #mealPlanGroup .haf-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 16px;
    border: 1.5px solid var(--v2-line-strong);
    border-radius: 12px !important;
    background: #fff;
    color: var(--v2-ink);
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.saf-v2 .saf-v2-tiles .saf-v2-pill:hover,
.saf-v2 .saf-v2-pills--stack .haf-checkbox-item:hover,
.saf-v2 #mealPlanGroup .haf-checkbox-item:hover { border-color: #aab3c2; background: #fafbfc; }
.saf-v2 .saf-v2-dot,
.saf-v2 .saf-v2-pills--stack .haf-checkbox-item::before,
.saf-v2 #mealPlanGroup .haf-checkbox-item::before {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 2px solid var(--v2-line-strong);
    border-radius: 50%;
    background: #fff;
    transition: border 0.15s ease, box-shadow 0.15s ease;
}
.saf-v2 .saf-v2-tiles .saf-v2-pill.is-selected,
.saf-v2 .saf-v2-pills--stack .haf-checkbox-item.is-selected,
.saf-v2 #mealPlanGroup .haf-checkbox-item.is-selected {
    border: 2px solid var(--haf-magenta);
    padding: 11.5px 15.5px;
    background: var(--v2-sel-bg);
    font-weight: 600;
}
.saf-v2 .saf-v2-pill.is-selected .saf-v2-dot,
.saf-v2 .saf-v2-pills--stack .haf-checkbox-item.is-selected::before,
.saf-v2 #mealPlanGroup .haf-checkbox-item.is-selected::before {
    border: 6px solid var(--haf-magenta);
}
.saf-v2 #mealPlanGroup { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; }
@media (max-width: 600px) { .saf-v2 #mealPlanGroup { grid-template-columns: 1fr; } }
.saf-v2 #mealPlanGroup .haf-checkbox-item span:not(.saf-v2-pill__price) { flex: 1 1 auto; }

/* ---------- Choices: category cards ---------- */
.saf-v2 .saf-v2-cards { gap: 12px; }
.saf-v2 button.saf-v2-card {
    position: relative;
    padding: 18px 18px 16px;
    border: 1.5px solid var(--v2-line-strong);
    border-radius: 16px !important;
    background: #fff;
    gap: 6px;
}
.saf-v2 button.saf-v2-card:hover { border-color: #aab3c2; background: #fafbfc; }
.saf-v2 button.saf-v2-card.is-selected {
    border: 2px solid var(--haf-magenta);
    padding: 17.5px 17.5px 15.5px;
    background: var(--v2-sel-bg);
    box-shadow: 0 6px 18px rgba(192, 38, 126, 0.12) !important;
}
.saf-v2 button.saf-v2-card.is-selected::after {
    content: "\2713";
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--haf-magenta);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}
.saf-v2 .saf-v2-card__name { font-size: 17px; }
.saf-v2 .saf-v2-card__price { font-size: 16px; margin-top: 4px; }
.saf-v2 button.saf-v2-card--help { border-style: dashed; background: #fbfcfd; }

/* ---------- Chips: duration quick picks + multi-select ---------- */
.saf-v2 .saf-v2-duration .saf-v2-pill,
.saf-v2 .saf-v2-pills--multi .haf-checkbox-item,
.saf-v2 .haf-v2-row .haf-checkbox-item {
    min-height: 40px;
    padding: 8px 16px;
    border: 1.5px solid var(--v2-line-strong);
    border-radius: 999px !important;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
}
.saf-v2 .saf-v2-duration .saf-v2-pill.is-selected,
.saf-v2 .saf-v2-pills--multi .haf-checkbox-item.is-selected,
.saf-v2 .haf-v2-row .haf-checkbox-item.is-selected {
    border-color: var(--v2-ink);
    background: var(--v2-ink);
    color: #fff;
}
.saf-v2 .saf-v2-duration .saf-v2-pill.is-selected .saf-v2-pill__price,
.saf-v2 .saf-v2-pills--multi .haf-checkbox-item.is-selected span,
.saf-v2 .haf-v2-row .haf-checkbox-item.is-selected span { color: #fff !important; }
.saf-v2 .saf-v2-pills--multi .haf-checkbox-item.is-selected span::before { color: #fff; }

/* ---------- Price card (in the flow) ---------- */
.saf-v2 .saf-pricing-card {
    border: 1px solid var(--v2-line);
    border-radius: 16px;
    background: #f8f9fb;
    box-shadow: none;
    margin: 8px 0 32px;
}
.saf-v2 .saf-pricing-card__header { background: none; border-bottom: 1px solid var(--v2-line); }
.saf-v2 .saf-pricing-row--total .saf-pricing-row__value { font-size: 22px; color: var(--haf-magenta); }

/* ---------- Buttons + nav ---------- */
.saf-v2 .haf-nav {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--v2-line);
}
.saf-v2 .haf-btn--next,
.saf-v2 .haf-btn--submit {
    min-height: 54px;
    padding: 14px 32px;
    border-radius: 999px;
    background: var(--haf-magenta) !important;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(192, 38, 126, 0.22);
}
.saf-v2 .haf-btn--next:hover,
.saf-v2 .haf-btn--submit:hover { background: var(--haf-magenta-dark) !important; transform: none; box-shadow: 0 8px 20px rgba(192, 38, 126, 0.28); }
.saf-v2 .haf-btn--next:focus-visible,
.saf-v2 .haf-btn--submit:focus-visible { outline: 3px solid var(--haf-blue); outline-offset: 2px; }
.saf-v2 .haf-btn--back {
    border: 0 !important;
    background: none !important;
    color: var(--haf-grey-600) !important;
    padding: 12px 8px;
    font-weight: 600;
    box-shadow: none;
}
.saf-v2 .haf-btn--back::before { content: "\2190\00a0"; }
.saf-v2 .haf-btn--back:hover { color: var(--v2-ink) !important; text-decoration: underline; }
@media (max-width: 600px) {
    .saf-v2 .haf-nav { flex-direction: column-reverse; gap: 6px; }
    .saf-v2 .haf-btn--next, .saf-v2 .haf-btn--submit { width: 100%; }
}
.saf-v2 .saf-v2-assure {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--haf-grey-600);
}
.saf-v2 .saf-v2-assure span::before { content: "\2713\00a0"; color: var(--haf-green); font-weight: 700; }

/* ---------- Review ---------- */
.saf-v2 .haf-review { border: 0; box-shadow: none; background: none; }
.saf-v2 .haf-review__header { display: none; }
.saf-v2 .haf-review__body { display: block !important; padding: 0; }
.saf-v2 .haf-review__section {
    margin: 0 0 14px;
    padding: 18px 20px;
    border: 1px solid var(--v2-line);
    border-radius: 14px;
    background: #fff;
}
.saf-v2 .haf-review__section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 10px;
    font-size: 16px;
    color: var(--v2-ink);
}
.saf-v2 button.saf-v2-edit {
    border: 0;
    background: none;
    padding: 4px 0;
    color: var(--haf-magenta);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    box-shadow: none;
}
.saf-v2 .haf-review__label { color: var(--haf-grey-600); }
.saf-v2 .haf-review__value { color: var(--v2-ink); font-weight: 600; }

/* ---------- Summary: sticky panel (desktop) / bottom sheet (phones) ---------- */
.saf-v2-summary { display: none; }
.saf-v2-summary h3 { margin: 0; font-size: 18px; color: #0f1b3d; }
.saf-v2-summary__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.saf-v2-summary__close { border: 0; background: none; font-size: 28px; line-height: 1; color: #6b7280; cursor: pointer; padding: 0 4px; }
.saf-v2-summary__list { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 16px; font-size: 14px; }
.saf-v2-summary__list dt { color: #6b7280; }
.saf-v2-summary__list dd { margin: 0; color: #0f1b3d; font-weight: 600; text-align: right; }
.saf-v2-summary__list dd.is-empty { color: #c0c6d0; font-weight: 400; }
.saf-v2-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid #e3e7ee; }
.saf-v2-summary__total span { font-weight: 600; color: #0f1b3d; }
.saf-v2-summary__total strong { font-size: 26px; color: #c0267e; }
.saf-v2-summary__breakdown summary { cursor: pointer; font-size: 14px; color: #2294D2; font-weight: 600; }
.saf-v2-summary__breakdown .saf-pricing-row { font-size: 13px; }
.saf-v2-summary__waiting { margin: 0; padding: 14px; border-radius: 12px; background: #f5f7fa; font-size: 14px; color: #4b5563; }
.saf-v2-summary__assure { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid #e3e7ee; font-size: 13px; color: #4b5563; }
.saf-v2-summary__assure li { margin: 0 0 6px; }
.saf-v2-summary__assure li::before { content: "\2713\00a0"; color: #16a34a; font-weight: 700; }
.saf-v2-backdrop { display: none; }
html.saf-v2-noscroll { overflow: hidden; }

@media (max-width: 1099px) {
    .saf-v2-summary.is-open {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        max-height: 85vh;
        overflow-y: auto;
        padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
        background: #fff;
        box-shadow: 0 -10px 40px rgba(15, 27, 61, 0.25);
        animation: saf-v2-up 0.25s ease;
    }
    .saf-v2-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 1000; background: rgba(15, 27, 61, 0.45); }
}
@keyframes saf-v2-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (min-width: 1100px) {
    .saf-v2.haf-form:has(.saf-v2-summary) {
        max-width: 1160px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        column-gap: 32px;
        align-items: start;
    }
    .saf-v2.haf-form:has(.saf-v2-summary) > * { grid-column: 1; }
    .saf-v2.haf-form:has(.saf-v2-summary) > .saf-v2-summary {
        grid-column: 2;
        grid-row: 1 / span 30;
        display: block;
        position: sticky;
        top: 110px;
        padding: 24px;
        border: 1px solid var(--v2-line);
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(15, 27, 61, 0.06);
    }
    .saf-v2-summary__close { display: none; }
    /* the panel already carries the price on desktop */
    .saf-v2 #safPricingCard { display: none; }
}
/* Hide the summary once the application is sent */
.saf-v2 .haf-success.is-active ~ .saf-v2-summary { display: none !important; }

/* ---------- Page around the form: slimmer hero on phones ----------
 * Since 2026-10-17 the website theme repeats these hero rules with !important
 * (v3/css/hero.css section 5, body.lh-hero-v3-form). A change here has no
 * effect on the hero until the theme rule changes too. */
@media (max-width: 700px) {
    body:has(.saf-v2) .lh-page-hero__media { display: none; }
    body:has(.saf-v2) .lh-page-hero { padding-top: 24px; padding-bottom: 24px; }
    body:has(.saf-v2) .lh-page-hero__heading { font-size: 26px; }
    body:has(.saf-v2) .lh-form-embed { padding-top: 20px !important; }
}
.saf-v2 .haf-loading.is-active ~ .saf-v2-summary { display: none !important; }
/* tiles: text left, price pushed right */
.saf-v2 .saf-v2-pills--stack .haf-checkbox-item,
.saf-v2 #mealPlanGroup .haf-checkbox-item { justify-content: flex-start !important; }
.saf-v2 .saf-v2-pills--stack .haf-checkbox-item > span { flex: 1 1 auto; text-align: left; }
.saf-v2 .saf-v2-pills--stack .saf-v2-pill__price { margin-left: 8px; }
/* "more than one person" stays closed until the link is tapped */
.saf-v2 #safHowManyField:not(.is-open) .saf-v2-pills--buttons { display: none !important; }
.saf-v2 .haf-review { padding: 0 !important; margin: 0 0 16px !important; }
.saf-v2 .haf-review__body { padding: 0 !important; }
.saf-v2-summary h3 { font-weight: 700; font-size: 20px; }
@media (min-width: 1100px) { .saf-v2 #safPricingRecap { display: none !important; } }

/* Buttons match the site's canonical .lh-btn-magenta (theme style.css):
   magenta gradient + lift. Variables come from the theme; fallbacks cover
   the standalone preview page. (Steve, 2026-10-16) */
.saf-v2 .haf-btn--next,
.saf-v2 .haf-btn--submit {
    background: linear-gradient(135deg, var(--lh-magenta, #c0267e) 0%, var(--lh-magenta-700, #a31f6b) 100%) !important;
    box-shadow: 0 10px 24px rgba(230, 0, 126, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.saf-v2 .haf-btn--next:hover,
.saf-v2 .haf-btn--submit:hover {
    background: linear-gradient(135deg, var(--lh-magenta, #c0267e) 0%, var(--lh-magenta-700, #a31f6b) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(184, 0, 102, 0.25);
}

/* The theme sets overflow-x:hidden on body and #container, which makes them
   scroll boxes and stops position:sticky following the window. "clip" hides
   sideways spill the same way without creating a scroll box. Only on pages
   that carry the v2 summary panel. */
@media (min-width: 1100px) {
    body:has(.saf-v2-summary),
    body:has(.saf-v2-summary) #container {
        overflow-x: clip !important;
        overflow-y: visible !important;
    }
}

/* "Help me choose": the budget panel opens attached under the cards */
.saf-v2 .saf-v2-budget.is-visible {
    margin: 12px 0 24px;
    padding: 18px 18px 6px;
    border: 1.5px solid var(--haf-magenta);
    border-radius: 16px;
    background: var(--v2-sel-bg);
    animation: haf-fadeIn 0.25s ease;
}
.saf-v2 .saf-v2-budget .saf-v2-seg { display: grid !important; grid-template-columns: repeat(4, 1fr); width: 100%; }
@media (max-width: 600px) { .saf-v2 .saf-v2-budget .saf-v2-seg { grid-template-columns: 1fr 1fr; } }
.saf-v2 .saf-v2-budget .saf-v2-seg .saf-v2-pill { min-width: 0; padding: 10px 8px; }
.saf-v2 .saf-v2-budget .haf-info { background: #fff !important; border-left: 0 !important; border-radius: 12px; }
.saf-v2 .saf-v2-budget .haf-info { padding: 14px; }
.saf-v2 .saf-suggestion-btn {
    width: 100%;
    min-height: 52px;
    margin: 0 0 8px;
    padding: 12px 14px;
    border: 1.5px solid var(--v2-line-strong) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--v2-ink);
    font-family: inherit;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
}
.saf-v2 .saf-suggestion-btn:hover { border-color: var(--haf-magenta) !important; background: var(--v2-sel-bg) !important; }
.saf-v2 .saf-suggestion-btn__label { font-weight: 600; font-size: 15px; text-align: left; }
.saf-v2 .saf-suggestion-btn__price { color: var(--haf-magenta); font-weight: 700; }

.saf-v2 .saf-v2-duration__hint { display: block; margin: -2px 0 10px; }

/* ---------- Summary panel: richer design ---------- */
.saf-v2-summary { overflow: hidden; }
@media (min-width: 1100px) {
    .saf-v2.haf-form:has(.saf-v2-summary) > .saf-v2-summary { padding: 0 !important; border: 0 !important; box-shadow: 0 2px 4px rgba(15, 27, 61, 0.05), 0 18px 40px rgba(15, 27, 61, 0.12) !important; }
}
.saf-v2-summary__head {
    position: relative;
    align-items: flex-start !important;
    margin: 0 !important;
    padding: 22px 24px 20px;
    background: #0f1b3d;
    color: #fff;
}
.saf-v2-summary__head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: #c0267e;
}
.saf-v2-summary__eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #f3a9d0; }
.saf-v2-summary h3 { color: #fff !important; font-size: 22px !important; margin: 0 0 6px !important; }
.saf-v2-summary__range { margin: 0; font-size: 14px; color: #d6dbe8; }
.saf-v2-summary__close { color: #fff !important; }
.saf-v2-summary__body { padding: 18px 24px 22px; background: #fff; }
.saf-v2-summary__list { gap: 0 !important; margin: 0 0 14px !important; }
.saf-v2-summary__list dt,
.saf-v2-summary__list dd { padding: 9px 0; border-bottom: 1px solid #eef0f4; }
.saf-v2-summary__list dt { display: flex; align-items: center; gap: 10px; }
.saf-v2-summary__icon { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; background: #f3f5f9; flex: 0 0 auto; }
.saf-v2-summary__icon svg { width: 16px; height: 16px; fill: none; stroke: #0f1b3d; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.saf-v2-summary__list dd { align-self: center; }
.saf-v2-summary__price { margin: 0 -24px; padding: 16px 24px; background: #fdf1f7; }
.saf-v2-summary__total { flex-wrap: wrap; border-top: 0 !important; padding: 0 !important; }
.saf-v2-summary__total strong { font-size: 30px !important; letter-spacing: -0.01em; }
.saf-v2-summary__total em { flex-basis: 100%; text-align: right; font-style: normal; font-size: 13px; color: #6b7280; margin-top: 2px; }
.saf-v2-summary__breakdown { margin-top: 10px; }
.saf-v2-summary__breakdown summary { color: #c0267e !important; }
.saf-v2-summary__waiting { background: #fff !important; }
.saf-v2-summary__assure { border-top: 0 !important; padding-top: 16px !important; }
.saf-v2-summary__assure li { display: flex; gap: 8px; align-items: flex-start; }
.saf-v2-summary__assure li::before {
    content: "\2713" !important;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e7f6ec;
    color: #16a34a !important;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}
/* bottom sheet on phones keeps the dark header */
@media (max-width: 1099px) { .saf-v2-summary.is-open { padding: 0 !important; } }
.saf-v2 .saf-v2-budget-incl { margin: 10px 0 0; font-size: 13px; color: #7a4f05; background: #fdf3e2; border-radius: 10px; padding: 8px 12px; }
.saf-v2-summary__list dt, .saf-v2-summary__list dd { align-self: stretch !important; display: flex; align-items: center; min-height: 46px; }
.saf-v2-summary__list dd { justify-content: flex-end; }
.saf-v2-summary__list { column-gap: 0 !important; }
/* under-18 notice: compact cost chip under the start date */
.saf-v2 #under18Notice.is-visible { margin: -10px 0 18px; }
.saf-v2 #under18Notice .haf-info { margin: 0; padding: 10px 14px; border-left: 0 !important; border-radius: 10px; font-size: 14px; }
.saf-v2 #under18Notice .haf-info p { margin: 0; }
.saf-v2 #under18Notice a { color: inherit; text-decoration: underline; }
.saf-v2 .saf-v2-cheaper { margin-top: 6px; }
.saf-v2 .saf-v2-cheaper summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--haf-magenta); padding: 6px 0 10px; }

/* Desktop panel never taller than the window: scroll inside it instead of
   spilling off the bottom when the price breakdown is opened. */
@media (min-width: 1100px) {
    .saf-v2.haf-form:has(.saf-v2-summary) > .saf-v2-summary {
        max-height: calc(100vh - 200px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
}
@media (min-width: 1100px) and (max-height: 820px) {
    .saf-v2-summary__list dt, .saf-v2-summary__list dd { min-height: 38px; padding: 6px 0; }
    .saf-v2-summary__head { padding: 16px 22px 14px; }
    .saf-v2-summary__assure { font-size: 12px; }
}

/* "See price breakdown": a clear full-width button, not a small link */
.saf-v2-summary__breakdown { margin-top: 14px !important; }
.saf-v2-summary__breakdown summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border: 1.5px solid #c0267e;
    border-radius: 12px;
    background: #fff;
    color: #c0267e !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: background 0.15s ease;
}
.saf-v2-summary__breakdown summary::-webkit-details-marker { display: none; }
.saf-v2-summary__breakdown summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s ease;
}
.saf-v2-summary__breakdown[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.saf-v2-summary__breakdown summary:hover { background: #fdf1f7; }
.saf-v2-summary__breakdown summary:focus-visible { outline: 3px solid #2294D2; outline-offset: 2px; }
.saf-v2-summary__breakdown[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.saf-v2-summary__breakdown > div { padding: 10px 14px 6px; border: 1.5px solid #c0267e; border-top: 0; border-radius: 0 0 12px 12px; background: #fff; }

/* Breakdown swaps in for the stay list (no inner scrolling) */
.saf-v2-summary__bdpane { display: none; }
.saf-v2-summary.show-breakdown .saf-v2-summary__list { display: none; }
.saf-v2-summary.show-breakdown .saf-v2-summary__bdpane { display: block; margin: 0 0 14px; animation: haf-fadeIn 0.2s ease; }
.saf-v2-summary__bdtitle { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #6b7280; }
.saf-v2-summary__bdpane .saf-pricing-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef0f4; font-size: 14px; }
.saf-v2-summary__bdpane .saf-pricing-row__label { color: #0f1b3d; }
.saf-v2-summary__bdpane .saf-pricing-row__value { font-weight: 600; color: #0f1b3d; white-space: nowrap; }
.saf-v2 button.saf-v2-summary__bdtoggle,
button.saf-v2-summary__bdtoggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
    padding: 11px 14px;
    border: 1.5px solid #c0267e !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #c0267e !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none !important;
    cursor: pointer;
}
button.saf-v2-summary__bdtoggle:hover { background: #fdf1f7 !important; }
button.saf-v2-summary__bdtoggle:focus-visible { outline: 3px solid #2294D2; outline-offset: 2px; }
/* the window cap stays as a safety net for very short screens only */
@media (min-width: 1100px) {
    .saf-v2.haf-form:has(.saf-v2-summary) > .saf-v2-summary { max-height: calc(100vh - 140px); }
}
/* compact breakdown so the worst case (7 lines) fits a 768px window */
.saf-v2-summary__bdpane .saf-pricing-row { padding: 6px 0; font-size: 13px; align-items: baseline; }
.saf-v2-summary__bdpane .saf-pricing-row__label { display: flex; flex-wrap: wrap; column-gap: 6px; }
.saf-v2-summary__bdpane .saf-pricing-row__desc,
.saf-v2-summary__bdpane .saf-pricing-row small { font-size: 11px; color: #6b7280; margin: 0; }
.saf-v2-summary__bdpane > div > div[style] { font-size: 11px !important; margin-top: 6px !important; }
.saf-v2-summary.show-breakdown .saf-v2-summary__assure { display: none; }
.saf-v2-summary.show-breakdown .saf-v2-summary__price { padding-top: 12px; padding-bottom: 12px; }
.saf-v2-summary__bdpane .saf-pricing-row__label br { display: none; }
