/* membership_plan.css — everything plan-shaped, for BOTH plans: the forms (gym_membership/forms/plan.html and
   gym_pt_session/forms/plan.html, both form.mpf) and the list cards (.mpl-*, at the end of the file, shared by
   gym_membership/components/card/plan.html and gym_pt_session/components/card/plan.html).
   Generic cards, fields, choice cards and the save bar come from ui_kit.css; this file only holds the plan-specific
   pieces: the column width, locked fields, the switch + revealed-fields option rows, the weekly check-in schedule
   and the class-quota pieces. */

.mpf .select-custom-content .btn { font-size: 12px; }

/* price / duration are frozen after creation (MembershipPlan.save() restores the originals) */
.mpf .form-control[readonly], .mpf .form-select:disabled { background: var(--custom_color_zircon); color: var(--custom_color_rolling_stone); cursor: not-allowed; }
/* the duration-type select and the points addon sit in the same column two rows apart: one width, so the
   number inputs beside them end on the same line */
.mpf { --mpf-addon-w: 96px; }
.mpf-duration .form-select { flex: 0 0 var(--mpf-addon-w); width: var(--mpf-addon-w); border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mpf-duration .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mpf-points .ui-unit, .mpf-unit .ui-unit { flex: 0 0 var(--mpf-addon-w); width: var(--mpf-addon-w); justify-content: center; }
/* the locked line (update page) between the two field rows: one grid cell, tighter than the row gap */
.mpf-notes { margin: -6px 0 -2px; }
.mpf-notes .ui-help { margin-top: 0; }
.mpf-notes .ui-help + .ui-help { margin-top: 3px; }
.mpf-notes b { font-family: 'Custom-Font-Semibold', sans-serif; }

/* the preset colour picker (utils/common/form/color_palette.html) inside a kit form: its label reads like a .ui-label */
.mpf .color-palette-field { margin-bottom: 0 !important; }
.mpf .color-palette-field > .form-label { font-size: 12.5px; font-weight: 600; color: var(--custom_color_outer_space); margin-bottom: 8px; line-height: 1.3; }

/* ---------- Basic / All settings (segmented pill) ---------- */
.mpf-mode { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; max-width: 880px; }
.mpf-mode__seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--custom_color_zircon); }
.mpf-mode__btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 0; border-radius: 999px; background: transparent;
    color: var(--custom_color_rolling_stone); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s;
}
.mpf-mode__btn i { font-size: 11px; }
.mpf-mode__btn:hover { color: var(--custom_color_v2_dark_navi_blue); }
.mpf-mode__btn.is-active { background: #fff; color: var(--custom_color_v2_dark_navi_blue); box-shadow: 0 1px 3px rgba(12, 27, 61, 0.12); }
@media (max-width: 767.98px) { .mpf-mode { margin-top: 10px; } }

/* one column of folding cards: capped so the two-column field grid inside stays a form, not a banner; the save
   bar is cut to the same width so its buttons end where the cards end instead of at the far right */
.mpf-stack, .mpf .ui-savebar { max-width: 880px; }
/* desktop: breathing room between the side nav and the form, so the page doesn't start hard against the nav */
@media (min-width: 992px) { .mpf { padding: 8px 32px 0 40px; } }

/* flat sections instead of boxed cards: no border / shadow / fill, just a hairline between sections, so the form
   reads as one page rather than four panels */
.mpf-stack.ui-stack > * + * { margin-top: 0; }
.mpf-stack > .ui-card { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 22px 0; }
.mpf-stack > .ui-card:first-child { padding-top: 4px; }
.mpf-stack > .ui-card + .ui-card { border-top: 1px solid var(--custom_color_mercury); }
/* an open section's content: a clear gap under its title, room before the next divider, and on desktop indented to
   the title text (36px icon + 12px gap) so the head reads as the parent of what it opens */
.mpf-stack > .ui-card .ui-card__body { padding-top: 24px; padding-bottom: 28px; }
/* desktop: 56px + the section's own 22px = 78px under an open section, so it clearly ends before the next divider */
@media (min-width: 992px) { .mpf-stack > .ui-card .ui-card__body { padding-left: 48px; padding-bottom: 56px; } }
/* Basic shows only Plan details: no head (title, icon, chevron) and nothing to fold, so the fields sit straight under
   the Basic / All settings toggle, always open (even if the card was folded in All settings) */
.mpf--basic .mpf-stack > .ui-card:first-child > .ui-card__head { display: none; }
.mpf--basic .mpf-stack > .ui-card:first-child .ui-card__body { padding-top: 0; padding-left: 0; }
.mpf--basic .mpf-stack > .ui-card:first-child > .collapse { display: block; height: auto !important; }

/* Access settings: membership check-in and class booking as two kit groups (.ui-group) in one section; this form's
   sections are roomier than the kit default, so the groups are too */
.mpf .ui-group__label i { width: 14px; margin-right: 6px; text-align: center; }
.mpf .ui-group__hint { margin-bottom: 16px; }
.mpf .ui-group + .ui-group { margin-top: 28px; padding-top: 24px; }
/* the Access Class dropdown: three short options, so it keeps a quota field's width instead of the whole row */
.mpf-class-access { max-width: 360px; }

/* ---------- option row: a switch line, with the fields it reveals tucked underneath ---------- */
.mpf-opts { display: flex; flex-direction: column; }
.mpf-opt { padding: 12px 0; border-top: 1px solid var(--custom_color_zircon); }
.mpf-opt:first-child { border-top: 0; padding-top: 0; }
.mpf-opt:last-child { padding-bottom: 0; }
.mpf-opt .ui-switch-row { padding: 0; border-bottom: 0; }
/* switch first, beside the title (not pushed to the far right): the text reads as the switch's label, and the fields it
   reveals indent to the text's edge. --mpf-switch-w is the MDB track plus the gap (its knob overhangs the track when on) */
.mpf { --mpf-switch-w: 48px; }
.mpf .ui-switch-row { justify-content: flex-start; align-items: flex-start; gap: 0; }
.mpf .ui-switch-row .form-check { order: -1; flex: 0 0 var(--mpf-switch-w); padding-top: 1px; }
.mpf-opt__body { margin-left: var(--mpf-switch-w); }
.mpf-opt__body { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--custom_color_alice_blue); border: 1px dashed var(--custom_color_regent_st_blue); }
.mpf-opt__body .ui-label { color: var(--custom_color_v2_dark_navi_blue); }
.mpf-opt__body .form-control, .mpf-opt__body .ui-unit { background: #fff; }
/* desktop: a single number (quota, sales limit, sharing count) doesn't need the whole row; the box keeps its width */
@media (min-width: 992px) { .mpf-opt__body .ui-fields--1 { max-width: 360px; } }

/* label row with one text action on the right (copy Monday, add a category) */
.mpf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.mpf-head__link { font-size: 11.5px; font-weight: 600; color: var(--custom_color_matisse); background: none; border: 0; padding: 0; white-space: nowrap; }
.mpf-head__link:hover { color: var(--custom_color_matisse); text-decoration: underline; }

/* ---------- weekly check-in schedule ---------- */
.mpf-week { display: flex; flex-direction: column; }
.mpf-day { display: grid; grid-template-columns: minmax(118px, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--custom_color_zircon); }
.mpf-day:first-child { border-top: 0; }
.mpf-day__toggle { display: flex; align-items: center; min-width: 0; }
.mpf-day__toggle .form-check { margin: 0; padding: 0; min-height: 0; }
/* the MDB knob overhangs the track when on: keep a margin so it never sits on the day name */
.mpf-day__toggle .form-check-input { margin: 0 14px 0 0; float: none; }
.mpf-day__name { font-size: 13px; font-weight: 600; color: var(--custom_color_bunker); text-transform: capitalize; margin: 0; cursor: pointer; white-space: nowrap; }
.mpf-day:not(.is-on) .mpf-day__name { color: var(--custom_color_bombay); font-weight: 500; }
.mpf-day__hours { display: flex; align-items: center; gap: 6px; }
.mpf-day__hours .form-control { width: 96px; border-radius: 8px; font-variant-numeric: tabular-nums; text-align: center; padding-left: 6px; padding-right: 6px; }
.mpf-day__dash { font-size: 11.5px; color: var(--custom_color_rolling_stone); }
.mpf-day__closed { font-size: 11.5px; color: var(--custom_color_bombay); white-space: nowrap; padding-right: 4px; }
.mpf-day.is-on .mpf-day__closed { display: none; }
.mpf-day:not(.is-on) .mpf-day__hours { display: none; }

@media (max-width: 479.98px) {   /* the day + two time inputs need ~455px side by side: stack on every phone */
    .mpf-day { grid-template-columns: 1fr; gap: 6px; }
    .mpf-day__hours { justify-content: flex-start; padding-left: 44px; }
    .mpf-day__closed { padding-left: 44px; }
}

/* ================= plan list: pricing cards =================
   gym_membership/components/card/plan.html and gym_pt_session/components/card/plan.html — one shell for both lists, so
   plans and PT packages read alike. Grid on desktop (table/list_plan.html), stack on phones (card/list_plan.html). The
   card is the kit's media-card shell (border, radius, shadow, open-menu escape). --mpl-accent is the category colour
   (navy for an uncategorised plan): hero and body stay white, only the foot carries a soft wash of it (and the small
   icons pick it up), so the card reads clean while a row of plans still reads by colour at a glance. */
.mpl-card { --mpl-accent: #3B507D; height: 100%; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.mpl-card:hover { transform: translateY(-2px); border-color: var(--custom_color_regent_st_blue); box-shadow: 0 16px 32px -14px rgba(12, 27, 61, 0.32); }
.mpl-card.is-archived:hover { opacity: 1; }

/* ---------- hero: chips, name, blurb, price ---------- */
.mpl-card__hero {
    padding: 16px 18px 16px;
    background: #fff;
}
/* the chevron + kebab in the corner; the chevron points up while the plans are open */
.mpl-card__actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.mpl-card__expand i { font-size: 12px; transition: transform .2s; }
.mpl-viewmode.is-complete .mpl-card__expand i { transform: rotate(180deg); }
.mpl-viewmode.is-complete .mpl-card__expand { color: var(--custom_color_v2_dark_navi_blue); }
/* a plan list folds the body (gym check-in / classes) until the chevron opens it */
.mpl-viewmode:not(.is-complete) .mpl-card__body { display: none; }
.mpl-card__name { font-family: 'Custom-Font-Bold', sans-serif; font-size: 18px; line-height: 1.2; color: var(--custom_color_bunker); margin: 0; overflow-wrap: anywhere; }
/* the name, with the chevron + kebab (and a PT package's sessions) at the end of its line: no separate head row */
.mpl-card__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mpl-card__title-row .mpl-card__name { padding-top: 3px; }
.mpl-card__side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mpl-card__title-row .mpl-card__actions { margin: 0 -8px 0 0; }
.mpl-sessions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 12.5px; white-space: nowrap; color: var(--custom_color_rolling_stone); }
.mpl-sessions b { font-family: 'Custom-Font-Semibold', sans-serif; font-weight: 700; font-size: 14px; color: var(--custom_color_bunker); }
.mpl-sessions i { font-size: 11px; color: var(--mpl-accent); }
.mpl-card__desc {
    font-size: 12.5px; line-height: 1.5; color: var(--custom_color_rolling_stone); margin: 4px 0 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mpl-card__price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; }
.mpl-card__amount {
    display: inline-flex; align-items: baseline; gap: 5px;
    font-family: 'Custom-Font-Bold', sans-serif; font-size: 28px; line-height: 1; letter-spacing: -0.6px;
    color: var(--custom_color_v2_dark_navi_blue); font-variant-numeric: tabular-nums;
}
.mpl-card__currency { font-size: 12px; font-weight: 700; letter-spacing: .4px; color: var(--custom_color_rolling_stone); }
.mpl-card__per {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--custom_color_outer_space);
    background: #fff; border: 1px solid color-mix(in srgb, var(--mpl-accent) 28%, #fff); box-shadow: 0 1px 2px rgba(12, 27, 61, 0.06);
}
.mpl-card__per i { font-size: 10px; color: var(--mpl-accent); }

/* ---------- body: what the plan grants, one section per thing ----------
   A membership plan has two (gym check-in, classes), a PT package one (its sessions). Each section is a tinted panel:
   small-caps head, the quota as its headline, then that section's own rules — where / when / with whom for the gym,
   which classes for classes, how long and what each costs for PT. A section the plan does not grant dims. */
.mpl-card__body { padding: 0 18px 16px; display: grid; gap: 10px; }
.mpl-sec {
    min-width: 0; padding: 11px 13px 12px; border-radius: 13px;
    background: var(--custom_color_alabaster); border: 1px solid var(--custom_color_zircon);
}
.mpl-sec__head { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--custom_color_rolling_stone); }
.mpl-sec__head i { width: 13px; text-align: center; font-size: 11px; color: var(--mpl-accent); }
.mpl-sec__value {
    margin: 5px 0 0; font-family: 'Custom-Font-Semibold', sans-serif; font-size: 16px; line-height: 1.2;
    color: var(--custom_color_bunker); overflow-wrap: anywhere;
}
.mpl-sec__value small { font-family: 'Custom-Font', sans-serif; font-size: 12.5px; font-weight: 400; color: var(--custom_color_rolling_stone); }
.mpl-sec__note { display: flex; align-items: center; gap: 7px; margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--custom_color_outer_space); }
.mpl-sec__note i { width: 13px; text-align: center; font-size: 10.5px; color: var(--custom_color_rolling_stone); }
.mpl-sec__note b { font-family: 'Custom-Font-Semibold', sans-serif; font-weight: 700; }
.mpl-sec__note--inline { display: inline; margin: 0; font-size: 11.5px; color: var(--custom_color_rolling_stone); }
.mpl-sec__chips { margin-top: 8px; }
.mpl-sec--bare > .mpl-sec__note:first-child { margin-top: 0; }   /* an untitled section (PT package) starts at its first line */
/* a section the plan does not grant: flat, greyed, no accent */
.mpl-sec.is-off { background: var(--custom_color_alabaster); }
.mpl-sec.is-off .mpl-sec__head i, .mpl-sec.is-off .mpl-sec__value { color: var(--custom_color_bombay); }

/* ---------- foot: sales, on-sale window, week strip ---------- */
/* the one coloured strip of the card: a soft wash of the category colour, full-bleed to the card's bottom edge */
.mpl-card__foot {
    margin-top: auto; padding: 12px 18px 14px; display: flex; flex-direction: column; gap: 8px;
    background: var(--custom_color_alice_blue);   /* browsers without color-mix keep a plain tint */
    background: color-mix(in srgb, var(--mpl-accent) 9%, #fff);
    border-top: 1px solid color-mix(in srgb, var(--mpl-accent) 16%, #fff);
}
.mpl-sold, .mpl-window, .mpl-stock__head > span:first-child { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--custom_color_rolling_stone); }
.mpl-sold i, .mpl-window i, .mpl-stock__head i { width: 14px; text-align: center; font-size: 11px; color: var(--mpl-accent); }
.mpl-sold b, .mpl-stock b { font-family: 'Custom-Font-Semibold', sans-serif; font-weight: 700; color: var(--custom_color_bunker); }
.mpl-stock__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.mpl-stock__state { font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--custom_color_v2_dark_navi_blue); }
.mpl-stock__bar { height: 6px; border-radius: 999px; background: #fff; overflow: hidden; }
.mpl-stock__bar span { display: block; height: 100%; max-width: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--custom_color_v2_abstract_blue), var(--custom_color_v2_dark_navi_blue)); }
.mpl-stock.is-out .mpl-stock__bar span { background: linear-gradient(90deg, #C09438, #B07A3C); }
.mpl-window.is-off, .mpl-window.is-off i { color: #A32D2D; }

/* seven day pills inside the gym section, shown only when the plan limits days or hours (cell/plan_week.html).
   A three-up card is ~300px wide: 7 pills of ~38px, so the inner padding is 1px and "All day" / "00:00" sit at 9px */
.mpl-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin-top: 9px; }
.mpl-week__day { min-width: 0; padding: 4px 1px; border-radius: 8px; text-align: center; line-height: 1.2; background: #fff; color: var(--custom_color_bombay); border: 1px solid var(--custom_color_mercury); }
.mpl-week__day.is-on { background: #fff; color: var(--custom_color_v2_dark_navi_blue); border-color: color-mix(in srgb, var(--mpl-accent) 35%, #fff); }
.mpl-week__name { display: block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .2px; }
.mpl-week__time { display: block; font-size: 9px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* phones: one card under another */
.mpl-stack .mpl-card { height: auto; margin-bottom: 12px; }
.mpl-stack .mpl-card:hover { transform: none; }
@media (max-width: 575px) {
    .mpl-card__hero { padding: 12px 14px 14px; }
    .mpl-card__body { padding: 0 14px 14px; }
    .mpl-card__foot { padding: 10px 14px 12px; }
}
