/* MF Creative Bookings — [mfc_memberships] picker + student-pick modal. */

.mfc-memberships,
.mfc-memberships-modal {
    --mfc-border: #e5e7eb;
    --mfc-border-strong: #d1d5db;
    --mfc-bg-soft: #fafafb;
    /* v0.37 friendly refresh: studio blue + soft corners, matching the
       signup wizard and calendar. Filled = primary, outlined = secondary. */
    --mfc-accent: #03469F;
    --mfc-accent-hover: #02356f;
    --mfc-accent-fg: #ffffff;
    --mfc-text: #111111;
    --mfc-text-soft: #1f2937;
    --mfc-muted: #6b7280;
    --mfc-danger: #b91c1c;
    --mfc-radius: 5px;
    --mfc-radius-card: 8px;

    font-family: inherit;
    color: var(--mfc-text);
}
.mfc-memberships { margin: 1em 0; }

.mfc-memberships__row {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    margin: 0 0 1em;
}
.mfc-memberships__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mfc-text-soft);
}
.mfc-memberships__select {
    padding: 0.7em 0.85em;
    border: 1px solid var(--mfc-border-strong);
    border-radius: var(--mfc-radius);
    background: #fff;
    color: var(--mfc-text);
    font: inherit;
    font-size: 1rem; /* ≥16px so iOS Safari doesn't zoom on focus */
    width: 100%;
    max-width: 32em;
}
.mfc-memberships__select:hover { border-color: var(--mfc-accent); }
.mfc-memberships__select:focus-visible {
    outline: none;
    border-color: var(--mfc-accent);
    box-shadow: 0 0 0 3px rgba(3, 70, 159, 0.25);
}

.mfc-memberships__actions { margin: 0; }
.mfc-memberships__btn {
    display: block;
    width: 100%;
    max-width: 32em;
    text-align: center;
    background: var(--mfc-accent);
    color: var(--mfc-accent-fg);
    border: 0;
    padding: 0.85em 1.5em;
    border-radius: var(--mfc-radius);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 120ms ease, transform 80ms ease, box-shadow 120ms ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.mfc-memberships__btn:hover {
    background: var(--mfc-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.mfc-memberships__btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.mfc-memberships__btn:disabled {
    background: var(--mfc-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.mfc-memberships__btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(3, 70, 159, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.mfc-memberships__no-students {
    margin: 0.75em 0 0;
    padding: 0.75em 1em;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--mfc-radius);
    color: #713f12;
    font-size: 0.9rem;
}
.mfc-memberships__sibling-note {
    margin: 0.75em 0 0;
    color: var(--mfc-muted);
    font-size: 0.85rem;
}
.mfc-memberships__error {
    margin: 0.75em 0 0;
    color: var(--mfc-danger);
    font-size: 0.9rem;
}

/* Public lesson and drop-in prices below the membership selector. */
.mfc-memberships__pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}
.mfc-memberships__price-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(1.1rem, 3vw, 1.75rem);
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius-card);
    background: #fff;
    box-shadow: 0 4px 18px rgba(3, 70, 159, 0.05);
}
.mfc-memberships .mfc-memberships__price-heading {
    margin: 0 0 0.5rem;
    padding: 0;
    color: var(--mfc-accent);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}
.mfc-memberships .mfc-memberships__price-description {
    margin: 0 0 1.25rem;
    padding: 0;
    color: var(--mfc-text-soft);
    font-size: 0.9rem;
    line-height: 1.6;
}
.mfc-memberships .mfc-memberships__price-list {
    margin: 0 0 1rem;
    padding: 0;
}
.mfc-memberships__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    min-height: 4.5rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--mfc-border);
}
.mfc-memberships__price-row dt { margin: 0; }
.mfc-memberships__price-label {
    display: block;
    color: var(--mfc-text);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}
.mfc-memberships__price-detail {
    display: block;
    margin-top: 0.15rem;
    color: var(--mfc-muted);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
}
.mfc-memberships .mfc-memberships__price-amount {
    margin: 0 0 0 auto;
    padding: 0;
    color: var(--mfc-accent);
    font-size: 1.3rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    white-space: nowrap;
}
/* Outrank Divi's p:not(.has-background):last-of-type padding reset. */
.mfc-memberships .mfc-memberships__price-card .mfc-memberships__price-note {
    margin: auto 0 0;
    padding: 0.7rem 0.85rem;
    border-radius: var(--mfc-radius);
    background: #f0f5fc;
    color: var(--mfc-text-soft);
    font-size: 0.8rem;
    line-height: 1.5;
}
.mfc-memberships .mfc-memberships__price-card .mfc-memberships__price-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--mfc-accent);
    border-radius: var(--mfc-radius);
    background: var(--mfc-accent);
    color: var(--mfc-accent-fg);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}
.mfc-memberships .mfc-memberships__price-card .mfc-memberships__price-cta:hover {
    border-color: var(--mfc-accent-hover);
    background: var(--mfc-accent-hover);
    color: var(--mfc-accent-fg);
}
.mfc-memberships .mfc-memberships__price-card .mfc-memberships__price-cta:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 3px;
}

/* ====================== MODAL ====================== */
/* Self-contained — does not depend on the calendar's modal styles being
   loaded, so [mfc_memberships] works on a standalone page. */
.mfc-memberships-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 17, 22, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Above Divi's fixed header (99999) and the WP admin bar (99999) —
       at 9999 the theme chrome painted over the dialog. */
    z-index: 100000;
    padding: 1em;
}
.mfc-memberships-modal__panel {
    background: #fff;
    border-radius: var(--mfc-radius-card);
    padding: 1.5em 1.5em 1.25em;
    width: 100%;
    max-width: 28em;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    color: var(--mfc-text);
    font-family: inherit;
}
.mfc-memberships-modal__title { margin: 0 0 0.6em; font-size: 1.15rem; }
.mfc-memberships-modal__detail { margin: 0 0 1.1em; color: var(--mfc-muted); font-size: 0.9rem; }
.mfc-memberships-modal__students {
    list-style: none;
    margin: 0 0 1.1em;
    padding: 0;
    display: grid;
    gap: 0.5em;
    max-height: 50vh;
    overflow-y: auto;
}
.mfc-memberships-modal__student {
    width: 100%;
    border: 1px solid var(--mfc-border);
    border-radius: var(--mfc-radius);
    background: #fff;
    padding: 0.7em 0.9em;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background 120ms ease, border-color 120ms ease;
}
.mfc-memberships-modal__student:hover {
    background: var(--mfc-bg-soft);
    border-color: var(--mfc-border-strong);
}
.mfc-memberships-modal__student[aria-pressed="true"] {
    border-color: var(--mfc-accent);
    background: #f0f5fc;
    box-shadow: 0 0 0 2px rgba(3, 70, 159, 0.18);
}
.mfc-memberships-modal__error {
    color: var(--mfc-danger);
    font-size: 0.9rem;
    margin: 0 0 0.75em;
}
.mfc-memberships-modal__actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5em;
}
.mfc-memberships-modal__btn {
    display: block;
    width: 100%;
    text-align: center;
    border: 1px solid var(--mfc-accent);
    border-radius: var(--mfc-radius);
    background: transparent;
    color: var(--mfc-accent);
    padding: 0.75em 1em;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.mfc-memberships-modal__btn:hover { background: #f0f5fc; }
.mfc-memberships-modal__btn--primary {
    background: var(--mfc-accent);
    border-color: var(--mfc-accent);
    color: var(--mfc-accent-fg);
}
.mfc-memberships-modal__btn--primary:hover { background: var(--mfc-accent-hover); border-color: var(--mfc-accent-hover); }
.mfc-memberships-modal__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.mfc-memberships-modal__btn:focus-visible {
    outline: 2px solid var(--mfc-accent);
    outline-offset: 2px;
}
