/* ═══════════════════════════════════════════════════
   Mini Mischiefs Portal — Standalone PWA Styles
   ═══════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────── */
:root {
    --mm-purple: #4E2068;
    --mm-purple-light: #682B8E;
    --mm-red: #B31C0F;
    --mm-red-dark: #8B1610;
    --mm-green: #27AE60;
    --mm-green-light: #2ecc71;
    --mm-amber: #E67E22;
    --mm-bg: #f4f0f7;
    --mm-card: #ffffff;
    --mm-text: #333333;
    --mm-text-light: #777777;
    --mm-border: #e8e0ee;
    --mm-radius: 16px;
    --mm-radius-sm: 10px;
    --mm-shadow: 0 4px 20px rgba(78, 32, 104, 0.08);
    --mm-shadow-hover: 0 8px 30px rgba(78, 32, 104, 0.15);
    --mm-font: 'myriad-pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mm-font-heading: 'myriad-pro-condensed', var(--mm-font);
}

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--mm-font);
    background: var(--mm-bg);
    color: var(--mm-text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--mm-purple); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Portal Layout ─────────────────────────────── */
.portal-wrap {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 100px;
    min-height: 100vh;
}

/* ── Portal Header ─────────────────────────────── */
.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--mm-border);
    margin-bottom: 20px;
}

.portal-header-logo {
    height: 36px;
    width: auto;
}

.portal-header-title {
    font-family: var(--mm-font-heading);
    font-size: 1.1em;
    font-weight: 700;
    color: var(--mm-purple);
    text-decoration: none;
}

.portal-header-action {
    font-size: 0.85em;
    color: var(--mm-text-light);
    cursor: pointer;
    border: none;
    background: none;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.portal-header-action:hover { background: rgba(78, 32, 104, 0.06); text-decoration: none; }

/* ── Cards ─────────────────────────────────────── */
.portal-card {
    background: var(--mm-card);
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow);
    padding: 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.3s ease;
    border: 1px solid var(--mm-border);
}

.portal-card:hover { box-shadow: var(--mm-shadow-hover); }

.portal-card-title {
    font-family: var(--mm-font-heading);
    font-size: 1.4em;
    font-weight: 700;
    color: var(--mm-purple);
    margin-bottom: 4px;
}

.portal-card-subtitle {
    font-size: 0.9em;
    color: var(--mm-text-light);
    margin-bottom: 16px;
}

/* ── Login Page ────────────────────────────────── */
.login-hero {
    text-align: center;
    padding: 40px 0 30px;
}

.login-hero-emoji { font-size: 3em; margin-bottom: 12px; }

.login-hero h1 {
    font-family: var(--mm-font-heading);
    font-size: 2em;
    font-weight: 700;
    color: var(--mm-purple);
    margin-bottom: 8px;
}

.login-hero p {
    color: var(--mm-text-light);
    font-size: 0.95em;
    max-width: 320px;
    margin: 0 auto;
}

.login-card { padding: 28px; }

.login-section-title {
    font-weight: 700;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mm-purple);
    margin-bottom: 14px;
}

.portal-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    font-size: 1em;
    font-family: var(--mm-font);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
    margin-bottom: 12px;
}

.portal-input:focus {
    outline: none;
    border-color: var(--mm-purple);
    box-shadow: 0 0 0 3px rgba(78, 32, 104, 0.1);
    background: white;
}

.portal-input::placeholder { color: #aaa; }

.portal-code-hint {
    margin: -4px 0 12px 0;
    font-size: 0.85em;
    color: #999;
    line-height: 1.3;
}

.portal-btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--mm-radius-sm);
    font-size: 1.05em;
    font-weight: 700;
    font-family: var(--mm-font);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    text-align: center;
}

.portal-btn:active { transform: scale(0.97); }

.portal-btn-primary {
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    box-shadow: 0 4px 15px rgba(78, 32, 104, 0.3);
}

.portal-btn-primary:hover {
    background: linear-gradient(135deg, var(--mm-purple-light), var(--mm-purple));
    box-shadow: 0 6px 20px rgba(78, 32, 104, 0.4);
    text-decoration: none;
    color: white;
}

.portal-btn-secondary {
    background: white;
    color: var(--mm-purple);
    border: 2px solid var(--mm-border);
}

.portal-btn-secondary:hover {
    background: var(--mm-bg);
    border-color: var(--mm-purple);
    text-decoration: none;
}

.portal-btn-danger {
    background: linear-gradient(135deg, var(--mm-red), var(--mm-red-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(179, 28, 15, 0.3);
}

.login-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #bbb;
    font-size: 0.85em;
    font-weight: 600;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--mm-border);
}

.login-divider:not(:empty)::before { margin-right: 12px; }
.login-divider:not(:empty)::after { margin-left: 12px; }

/* ── Alerts ────────────────────────────────────── */
.portal-alert {
    padding: 14px 18px;
    border-radius: var(--mm-radius-sm);
    font-weight: 600;
    font-size: 0.92em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.portal-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.portal-alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* ── Tabs ──────────────────────────────────────── */
.portal-tabs {
    display: flex;
    background: var(--mm-card);
    border-radius: var(--mm-radius);
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: var(--mm-shadow);
    border: 1px solid var(--mm-border);
}

.portal-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.92em;
    color: var(--mm-text-light);
    border: none;
    background: none;
    cursor: pointer;
    border-radius: calc(var(--mm-radius) - 4px);
    transition: all 0.25s ease;
    font-family: var(--mm-font);
}

.portal-tab:hover { color: var(--mm-purple); }

.portal-tab.active {
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    box-shadow: 0 2px 8px rgba(78, 32, 104, 0.25);
}

.portal-tab-content { display: none; animation: portalFadeIn 0.35s ease; }
.portal-tab-content.active { display: block; }

/* ── Pass Card ─────────────────────────────────── */
.pass-card {
    background: linear-gradient(145deg, var(--mm-purple), var(--mm-purple-light));
    border-radius: var(--mm-radius);
    padding: 24px;
    color: white;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(78, 32, 104, 0.3);
}

.pass-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.pass-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.pass-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.pass-card-brand {
    font-family: var(--mm-font-heading);
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.pass-card-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pass-badge-active { background: var(--mm-green); color: white; }
.pass-badge-expiring { background: var(--mm-amber); color: white; }
.pass-badge-expired { background: var(--mm-red); color: white; }

.pass-card-child {
    font-family: var(--mm-font-heading);
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.pass-card-code {
    font-family: 'Courier New', monospace;
    font-size: 1.05em;
    opacity: 0.85;
    letter-spacing: 1px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.pass-card-expiry {
    font-size: 1.05em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.pass-card-qr {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 260px;
    margin: 0 auto;
}

.pass-card-qr canvas,
.pass-card-qr img { width: 100% !important; height: auto !important; }

.pass-card-scan-hint {
    font-size: 0.85em;
    color: #ffffff;
    margin-top: 10px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.pass-card-renew {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--mm-radius-sm);
    color: white;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.pass-card-renew:hover {
    background: rgba(255, 255, 255, 0.25);
    text-decoration: none;
    color: white;
}

/* ── Booking Card ──────────────────────────────── */
.booking-card {
    background: var(--mm-card);
    border-radius: var(--mm-radius);
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
}

.booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.booking-card-title {
    font-family: var(--mm-font-heading);
    font-size: 1.3em;
    font-weight: 700;
    color: var(--mm-purple);
}

.booking-card-countdown {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    background: var(--mm-bg);
    color: var(--mm-purple);
    white-space: nowrap;
}

.booking-card-date {
    font-size: 0.92em;
    color: var(--mm-text-light);
    margin-bottom: 14px;
}

.booking-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.booking-stat {
    background: var(--mm-bg);
    padding: 10px 14px;
    border-radius: var(--mm-radius-sm);
}

.booking-stat-label {
    font-size: 0.75em;
    font-weight: 600;
    color: var(--mm-text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.booking-stat-value {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--mm-text);
}

.booking-stat-value.paid { color: var(--mm-green); }
.booking-stat-value.due { color: var(--mm-red); }

.booking-stat-sublabel {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--mm-text-light);
    margin-top: 2px;
}
.booking-stat-sublabel.due { color: var(--mm-red); }

.booking-card-actions {
    display: flex;
    gap: 8px;
}

.booking-card-actions .portal-btn {
    flex: 1;
    padding: 12px;
    font-size: 0.9em;
}

/* Stacked action buttons in booking cards */
.booking-card-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.booking-card-actions-stack .portal-btn { font-size: 0.92em; padding: 14px; }

.booking-action-form { display: contents; }

/* ── Expired Pass Box ──────────────────────────── */
.pass-expired-box {
    background: rgba(255, 255, 255, 0.12);
    border: 2px dashed rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.pass-expired-icon { font-size: 2.5em; margin-bottom: 8px; }

.pass-expired-title {
    font-family: var(--mm-font-heading);
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 6px;
}

.pass-expired-text {
    font-size: 0.88em;
    opacity: 0.8;
}

/* ── Food Selection Page ───────────────────────── */
.food-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mm-purple);
    font-weight: 600;
    font-size: 0.92em;
    margin-bottom: 16px;
    padding: 8px 0;
}

.food-page-back:hover { text-decoration: none; opacity: 0.8; }

.food-type-tabs {
    display: flex;
    background: var(--mm-card);
    border-radius: var(--mm-radius);
    padding: 4px;
    margin-bottom: 16px;
    box-shadow: var(--mm-shadow);
    border: 1px solid var(--mm-border);
}

.food-type-tab {
    flex: 1;
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85em;
    color: var(--mm-text-light);
    border: none;
    background: none;
    cursor: pointer;
    border-radius: calc(var(--mm-radius) - 4px);
    transition: all 0.25s ease;
    font-family: var(--mm-font);
}

.food-type-tab.active {
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    box-shadow: 0 2px 8px rgba(78, 32, 104, 0.25);
}

.food-type-content { display: none; animation: portalFadeIn 0.3s ease; }
.food-type-content.active { display: block; }

.food-item-card {
    background: var(--mm-card);
    border-radius: var(--mm-radius-sm);
    padding: 14px 16px;
    margin-bottom: 8px;
    border: 2px solid var(--mm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.food-item-card:hover { border-color: var(--mm-purple); }

.food-item-card.selected {
    border-color: var(--mm-purple);
    background: #f5f0f8;
}

.food-item-info { flex: 1; }

.food-item-name {
    font-weight: 700;
    font-size: 0.95em;
    color: var(--mm-text);
}

.food-item-notes {
    font-size: 0.8em;
    color: var(--mm-text-light);
    margin-top: 2px;
}

.food-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.food-qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--mm-border);
    background: white;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    color: var(--mm-purple);
    font-family: var(--mm-font);
}

.food-qty-btn:hover { border-color: var(--mm-purple); background: var(--mm-bg); }
.food-qty-btn:active { transform: scale(0.9); }

.food-qty-num {
    font-weight: 700;
    font-size: 1.1em;
    min-width: 24px;
    text-align: center;
}

.food-progress-bar {
    background: var(--mm-card);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius);
    padding: 14px 18px;
    position: sticky;
    bottom: 16px;
    margin-top: 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 10;
}

.food-progress-text {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--mm-text-light);
    margin-bottom: 8px;
    text-align: center;
}

.food-progress-track {
    height: 8px;
    background: var(--mm-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.food-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
    background: var(--mm-purple);
}

.food-progress-fill.complete { background: var(--mm-green); }
.food-progress-fill.over { background: var(--mm-red); }

/* ── Empty State ───────────────────────────────── */
.portal-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--mm-text-light);
}

.portal-empty-emoji { font-size: 3em; margin-bottom: 12px; }

.portal-empty h3 {
    font-family: var(--mm-font-heading);
    font-size: 1.3em;
    color: var(--mm-purple);
    margin-bottom: 8px;
}

/* ── Check-in Result (Full Screen) ─────────────── */
.checkin-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    text-align: center;
}

.checkin-result-icon { font-size: 5em; margin-bottom: 20px; }

.checkin-result h1 {
    font-family: var(--mm-font-heading);
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.checkin-result p {
    font-size: 1.2em;
    margin-bottom: 6px;
}

.checkin-success { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); color: #1b5e20; }
.checkin-fail { background: linear-gradient(135deg, #ffebee, #ffcdd2); color: #b71c1c; }
.checkin-duplicate { background: linear-gradient(135deg, #fff3e0, #ffe0b2); color: #e65100; }

.checkin-meta {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.7;
}

/* ── Scanner Page ──────────────────────────────── */
.scanner-wrap {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.scanner-header {
    text-align: center;
    padding: 20px 0;
}

.scanner-header h1 {
    font-family: var(--mm-font-heading);
    font-size: 1.8em;
    color: var(--mm-purple);
}

.scanner-video-wrap {
    border-radius: var(--mm-radius);
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
}

.scanner-manual {
    margin-top: 20px;
}

.scanner-pin-wrap {
    text-align: center;
    padding: 60px 20px;
}

.scanner-pin-wrap h2 {
    font-family: var(--mm-font-heading);
    font-size: 1.6em;
    color: var(--mm-purple);
    margin-bottom: 20px;
}

.pin-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.pin-input input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    border: 2px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    font-family: var(--mm-font);
    transition: border-color 0.2s;
}

.pin-input input:focus {
    outline: none;
    border-color: var(--mm-purple);
}

/* ── Loading Spinner ───────────────────────────── */
.portal-loading {
    text-align: center;
    padding: 40px;
    color: var(--mm-text-light);
}

.portal-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--mm-border);
    border-top-color: var(--mm-purple);
    border-radius: 50%;
    animation: portalSpin 0.8s linear infinite;
}

/* ── Animations ────────────────────────────────── */
@keyframes portalFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes portalSpin {
    to { transform: rotate(360deg); }
}

/* ── Honeypot ──────────────────────────────────── */
.portal-hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 400px) {
    .portal-wrap { padding: 0 12px 80px; }
    .pass-card { padding: 18px; }
    .pass-card-child { font-size: 1.5em; }
    .portal-card { padding: 18px; }
    .booking-card-stats { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   Party Management Page Styles
   ═══════════════════════════════════════════════════ */

/* ── Party Hero ─────────────────────────────────── */
.party-hero {
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    border-radius: var(--mm-radius);
    padding: 28px 24px;
    text-align: center;
    margin-bottom: 16px;
}
.party-hero-emoji { font-size: 2.5em; margin-bottom: 8px; }
.party-hero-title { font-family: var(--mm-font-heading); font-size: 1.6em; font-weight: 800; }
.party-hero-sub { font-size: 0.9em; opacity: 0.9; margin-top: 4px; }
.party-hero-ref { font-size: 0.78em; opacity: 0.7; margin-top: 6px; }

.party-countdown {
    background: rgba(255,255,255,0.15);
    border-radius: var(--mm-radius-sm);
    padding: 10px 16px;
    margin-top: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.party-countdown-num {
    font-size: 1.8em;
    font-weight: 900;
    line-height: 1;
}
.party-countdown-today {
    background: rgba(255,255,255,0.2);
    font-size: 1em;
}

/* ── Checklist Progress ─────────────────────────── */
.party-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.party-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--mm-border);
    border-radius: 4px;
    overflow: hidden;
}
.party-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mm-green), var(--mm-green-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}
.party-progress-text {
    font-size: 0.82em;
    color: var(--mm-text-light);
    white-space: nowrap;
}

.party-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mm-border);
    font-size: 0.92em;
}
.party-check-item:last-child { border-bottom: none; }
.party-check-item.done { color: var(--mm-green); }
.party-check-item.done .party-check-label { text-decoration: line-through; opacity: 0.7; }
.party-check-item.optional { color: var(--mm-text-light); }
.party-check-icon { font-size: 1.1em; flex-shrink: 0; }

/* ── Payment Strip ──────────────────────────────── */
.party-payment-strip { margin-top: 4px; }
.party-payment-label { font-size: 0.85em; color: var(--mm-text-light); }
.party-payment-amount { font-size: 1.5em; font-weight: 800; color: var(--mm-text); }
.party-payment-amount.overdue { color: var(--mm-red); }
.party-payment-amount.paid { color: var(--mm-green); }
.party-overdue-badge {
    display: inline-block;
    background: var(--mm-red);
    color: white;
    font-size: 0.45em;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 6px;
    font-weight: 700;
}

/* ── Breakdown ──────────────────────────────────── */
.party-breakdown-details { margin-top: 12px; }
.party-breakdown-toggle {
    font-size: 0.85em;
    color: var(--mm-purple);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.party-breakdown-toggle::-webkit-details-marker { display: none; }
.party-breakdown { margin-top: 10px; }
.party-bk-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--mm-border);
    font-size: 0.88em;
}
.party-bk-row:last-child { border-bottom: none; }

/* ── RSVP ───────────────────────────────────────── */
.party-share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.party-share-buttons .portal-btn { flex: 1; min-width: 100px; }

.party-rsvp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--mm-border);
    font-size: 0.9em;
}
.party-rsvp-row:last-child { border-bottom: none; }

.party-diet-badge {
    display: inline-block;
    background: #fef3cd;
    color: #856404;
    font-size: 0.75em;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* ── Extra Catering ─────────────────────────────── */
.extra-filling-row {
    display: none;
    animation: fadeInDown 0.3s ease;
}
.extra-filling-row.active { display: block; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Manage Party Button ────────────────────────── */
.booking-manage-btn {
    display: block;
    text-align: center;
    margin-top: 8px;
    padding: 10px;
    background: var(--mm-bg);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    font-weight: 600;
    font-size: 0.88em;
    color: var(--mm-purple);
    transition: all 0.2s ease;
}
.booking-manage-btn:hover {
    background: var(--mm-purple);
    color: white;
    text-decoration: none;
}

/* ── Upsell Card ────────────────────────────────── */
.upsell-card {
    border: 2px solid transparent;
    background: linear-gradient(var(--mm-card), var(--mm-card)) padding-box,
                linear-gradient(135deg, var(--mm-purple), var(--mm-amber)) border-box;
    position: relative;
    overflow: hidden;
}
.upsell-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: linear-gradient(135deg, transparent 50%, rgba(78,32,104,0.06) 50%);
    pointer-events: none;
}
.upsell-card-header {
    margin-bottom: 4px;
}
.upsell-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    font-size: 0.72em;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.upsell-cta {
    font-weight: 700;
    font-size: 1em;
    padding: 14px;
    border-radius: var(--mm-radius-sm);
    transition: all 0.2s ease;
}
.upsell-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(78,32,104,0.2);
    text-decoration: none;
}
.upsell-card-inline {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--mm-border);
    text-align: center;
}

/* ── Extras Text Input ──────────────────────────── */
.extras-text-input {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    font-size: 0.9em;
    font-family: var(--mm-font);
}

/* ── Renewal Pass Cards ─────────────────────────── */
.renew-pass-card {
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.renew-pass-card.selected {
    border-color: var(--mm-purple);
    background: #f5f0f8;
}

/* ── Pass Price Pills ───────────────────────────── */
.pass-price-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--mm-bg);
    border: 2px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    padding: 10px 18px;
    min-width: 100px;
}
.pass-price-amount {
    font-size: 1.3em;
    font-weight: 800;
    color: var(--mm-red);
}
.pass-price-label {
    font-size: 0.78em;
    color: var(--mm-text-light);
    font-weight: 600;
}

/* ── Child Input Rows ───────────────────────────── */
.child-input-row {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mm-border);
}
.child-input-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ═══════════════════════════════════════════════════
   Party Browse Page Styles
   ═══════════════════════════════════════════════════ */

/* ── Filter Bar ────────────────────────────────── */
.browse-filter-bar {
    display: flex;
    background: var(--mm-card);
    border-radius: var(--mm-radius);
    padding: 4px;
    margin-bottom: 16px;
    box-shadow: var(--mm-shadow);
    border: 1px solid var(--mm-border);
    gap: 4px;
}

.browse-filter-btn {
    flex: 1;
    padding: 10px 6px;
    text-align: center;
    font-weight: 700;
    font-size: 0.82em;
    color: var(--mm-text-light);
    border: none;
    background: none;
    cursor: pointer;
    border-radius: calc(var(--mm-radius) - 4px);
    transition: all 0.25s ease;
    font-family: var(--mm-font);
}

.browse-filter-btn:hover { color: var(--mm-purple); }

.browse-filter-btn.active {
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    box-shadow: 0 2px 8px rgba(78, 32, 104, 0.25);
}

/* ── Browse Cards ──────────────────────────────── */
.browse-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.browse-card {
    background: var(--mm-card);
    border-radius: var(--mm-radius);
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    animation: portalFadeIn 0.35s ease;
}

.browse-card:hover {
    box-shadow: var(--mm-shadow-hover);
    transform: translateY(-2px);
}

.browse-card-top {
    padding: 16px 20px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.browse-card-emoji { font-size: 2em; }

.browse-card-badge {
    display: inline-block;
    background: var(--mm-purple);
    color: white;
    font-size: 0.72em;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.browse-card-body { padding: 0 20px 20px; }

.browse-card-name {
    font-family: var(--mm-font-heading);
    font-size: 1.35em;
    font-weight: 800;
    color: var(--mm-purple);
    margin-bottom: 4px;
}

.browse-card-price {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--mm-text);
    margin-bottom: 10px;
}

.browse-card-price-suffix {
    font-size: 0.5em;
    font-weight: 400;
    color: var(--mm-text-light);
}

.browse-card-bullets {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
}

.browse-card-bullets li {
    position: relative;
    padding: 3px 0 3px 18px;
    font-size: 0.88em;
    color: var(--mm-text);
    line-height: 1.5;
}

.browse-card-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--mm-green);
    font-weight: 700;
}

/* ── Theme Accents ─────────────────────────────── */
.browse-theme-blue .browse-card-top { border-top: 4px solid var(--mm-purple); }
.browse-theme-green .browse-card-top { border-top: 4px solid var(--mm-green); }
.browse-theme-orange .browse-card-top { border-top: 4px solid var(--mm-amber); }

/* ── Expandable Details ────────────────────────── */
.browse-card-details { margin-bottom: 14px; }

.browse-card-details-toggle {
    font-size: 0.85em;
    color: var(--mm-purple);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    padding: 8px 0;
}
.browse-card-details-toggle::-webkit-details-marker { display: none; }

.browse-card-details[open] .browse-card-details-toggle { margin-bottom: 10px; }

.browse-card-features { animation: portalFadeIn 0.3s ease; }

.browse-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mm-border);
    font-size: 0.88em;
}
.browse-feature-item:last-child { border-bottom: none; }

.browse-feature-icon {
    font-size: 1.3em;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.browse-feature-desc {
    color: var(--mm-text-light);
    font-size: 0.92em;
    margin-top: 2px;
}

.browse-card-notes {
    background: var(--mm-bg);
    border-radius: var(--mm-radius-sm);
    padding: 10px 14px;
    font-size: 0.82em;
    color: var(--mm-text-light);
    margin-top: 10px;
    line-height: 1.5;
}

.browse-book-btn {
    margin-top: 4px;
    text-align: center;
    display: block;
}

/* ── Info Grid ─────────────────────────────────── */
.browse-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 14px;
}
@media (max-width: 400px) {
    .browse-info-grid { grid-template-columns: 1fr; }
}

.browse-info-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}
.browse-info-list li {
    padding: 3px 0;
    font-size: 0.85em;
    color: var(--mm-text-light);
    position: relative;
    padding-left: 16px;
}
.browse-info-list li::before {
    content: '·';
    position: absolute;
    left: 0;
    font-weight: 900;
    color: var(--mm-purple);
}

/* ═══════════════════════════════════════════════════
   Party Booking Wizard Styles
   ═══════════════════════════════════════════════════ */

/* ── Wizard Header ─────────────────────────────── */
.wiz-header {
    text-align: center;
    margin-bottom: 16px;
}
.wiz-header-name {
    font-family: var(--mm-font-heading);
    font-size: 1.5em;
    font-weight: 800;
    color: var(--mm-purple);
}
.wiz-header-price {
    font-size: 0.9em;
    color: var(--mm-text-light);
    margin-top: 2px;
}

/* ── Step Pips ─────────────────────────────────── */
.wiz-pips {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
}

.wiz-pip {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--mm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82em;
    color: var(--mm-text-light);
    background: var(--mm-card);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.wiz-pip.active {
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    border-color: var(--mm-purple);
    box-shadow: 0 2px 10px rgba(78, 32, 104, 0.3);
}

.wiz-pip.done {
    background: var(--mm-green);
    color: white;
    border-color: var(--mm-green);
}

.wiz-pip-line {
    flex: 1;
    max-width: 40px;
    height: 2px;
    background: var(--mm-border);
}

/* ── Steps ─────────────────────────────────────── */
.wiz-step {
    display: none;
    animation: portalFadeIn 0.35s ease;
}
.wiz-step.active { display: block; }

.wiz-change-link {
    display: inline-block;
    font-size: 0.85em;
    color: var(--mm-purple);
    font-weight: 600;
    margin-top: 4px;
}

.wiz-slot-summary {
    background: var(--mm-bg);
    padding: 10px 14px;
    border-radius: var(--mm-radius-sm);
    font-weight: 600;
    font-size: 0.92em;
    color: var(--mm-purple);
    margin-bottom: 16px;
}

/* ── Fields ────────────────────────────────────── */
.wiz-field {
    margin-bottom: 12px;
}
.wiz-field label {
    display: block;
    font-weight: 600;
    font-size: 0.88em;
    margin-bottom: 4px;
    color: var(--mm-text);
}

.wiz-field-error {
    display: none;
    color: var(--mm-red);
    font-size: 0.82em;
    font-weight: 600;
    margin-top: 4px;
}

.wiz-back-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.88em;
    color: var(--mm-purple);
    font-weight: 600;
}

/* ── Summary ───────────────────────────────────── */
.wiz-summary {
    background: var(--mm-bg);
    border-radius: var(--mm-radius-sm);
    padding: 16px;
    margin-bottom: 16px;
}

.wiz-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.92em;
    border-bottom: 1px dashed var(--mm-border);
}
.wiz-summary-row:last-of-type { border-bottom: none; }

.wiz-summary-total {
    font-size: 1.05em;
    font-weight: 800;
    color: var(--mm-text);
    padding: 10px 0 6px;
    border-top: 2px solid var(--mm-border);
    border-bottom: none;
}

/* ── Checkboxes ────────────────────────────────── */
.wiz-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.88em;
    cursor: pointer;
    line-height: 1.4;
}
.wiz-checkbox-row input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--mm-purple);
}

/* ── Slot Cards (AJAX results) ─────────────────── */
.slot-results { margin-top: 15px; }

.day-group {
    margin-bottom: 20px;
}
.day-group-label {
    font-weight: 700;
    color: var(--mm-purple);
    font-size: 0.95em;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--mm-border);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.day-group.day-highlight {
    background: #f9f5fc;
    border: 2px solid var(--mm-purple);
    border-radius: var(--mm-radius-sm);
    padding: 12px;
}
.day-group.day-highlight .day-group-label {
    border-bottom-color: #e3d6ee;
}

.slot-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 8px;
    border: 2px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--mm-card);
}
.slot-card:hover, .slot-card:active {
    border-color: var(--mm-purple);
    background: #f9f5fc;
}
.slot-card .slot-time {
    font-weight: 700;
    font-size: 1.05em;
    color: var(--mm-text);
}
.slot-card .slot-room {
    font-size: 0.85em;
    color: var(--mm-text-light);
    margin-top: 2px;
}
.slot-card .slot-arrow {
    color: #fff;
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    font-size: 0.85em;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.slot-card.sold-out {
    cursor: default;
    border-color: var(--mm-border);
    background: var(--mm-card);
    opacity: 0.6;
}
.slot-card.sold-out:hover { border-color: var(--mm-border); background: var(--mm-card); }
.slot-card.sold-out .sold-out-badge {
    color: #fff;
    background: var(--mm-red);
    font-size: 0.85em;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.no-slots {
    text-align: center;
    padding: 25px;
    color: var(--mm-text-light);
    background: var(--mm-bg);
    border-radius: var(--mm-radius-sm);
}

/* --- Upsell Card (Mini → Full Private) --- */
.upgrade-suggestion {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFF0CC 100%);
    border: 2px solid var(--mm-amber);
    border-radius: var(--mm-radius-sm);
    padding: 15px;
    margin-bottom: 10px;
}
.upgrade-suggestion .upgrade-label {
    font-weight: 800;
    color: var(--mm-red);
    font-size: 0.95em;
    margin-bottom: 4px;
}
.upgrade-suggestion .upgrade-text {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
}
.upgrade-suggestion .slot-card {
    border-color: var(--mm-amber);
    background: #fff;
}
.upgrade-suggestion .slot-card:hover {
    border-color: #e09200;
    background: #fffbf0;
}

/* ═══════════════════════════════════════════════════
   Session Calendar & Booking Form Styles
   ═══════════════════════════════════════════════════ */

/* ── Day Container ─────────────────────────────── */
.sess-list { margin-top: 8px; }

.sess-day {
    background: var(--mm-card);
    border-radius: var(--mm-radius);
    border: 1px solid var(--mm-border);
    box-shadow: var(--mm-shadow);
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
}

.sess-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
    gap: 8px;
    flex-wrap: wrap;
}

.sess-day-title {
    font-family: var(--mm-font-heading);
    font-size: 1.1em;
    font-weight: 800;
    color: var(--mm-purple);
}

.sess-badge {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.sess-badge-peak {
    background: var(--mm-red);
    color: white;
}

.sess-badge-offpeak {
    background: var(--mm-green);
    color: white;
}

/* ── Open Play Message ─────────────────────────── */
.sess-open-play {
    padding: 16px 18px 18px;
    text-align: center;
    font-size: 0.9em;
    color: var(--mm-text);
    line-height: 1.6;
}

.sess-open-play-emoji {
    font-size: 2em;
    margin-bottom: 4px;
}

/* ── Slot Grid ─────────────────────────────────── */
.sess-slot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 14px 14px;
}
@media (max-width: 360px) {
    .sess-slot-grid { grid-template-columns: 1fr; }
}

.sess-slot {
    border: 2px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    padding: 12px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.sess-slot:not(.sess-slot-full):hover {
    border-color: var(--mm-purple);
    background: #f9f5fc;
}

.sess-slot-quietest {
    border-color: #F7A50D;
    background: #FFFDF5;
    padding-top: 24px;
}

.sess-quiet-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: #F7A50D;
    color: white;
    font-size: 0.68em;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 0 8px 0 8px;
}

.sess-slot-time {
    font-weight: 700;
    font-size: 0.88em;
    color: var(--mm-text);
    margin-bottom: 6px;
}

.sess-slot-avail {
    font-size: 0.78em;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 8px;
}

.avail-high { background: #e8f5e9; color: #2e7d32; }
.avail-med { background: #fff3e0; color: #e65100; }
.avail-low { background: #ffebee; color: #c62828; }
.avail-none { background: #f5f5f5; color: #999; }

.sess-slot-btn {
    display: block;
    background: linear-gradient(135deg, var(--mm-purple), var(--mm-purple-light));
    color: white;
    font-weight: 700;
    font-size: 0.85em;
    padding: 8px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.sess-slot-btn:hover {
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(78, 32, 104, 0.3);
}

.sess-slot-full {
    opacity: 0.5;
}

.sess-slot-btn-disabled {
    display: block;
    background: #f0f0f0;
    color: #999;
    font-weight: 700;
    font-size: 0.85em;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: default;
}

/* ── Stepper Controls ──────────────────────────── */
.sess-stepper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--mm-border);
    gap: 10px;
}

.sess-stepper-label {
    font-weight: 600;
    font-size: 0.92em;
    color: var(--mm-text);
    flex: 1;
}

.sess-stepper-price {
    display: block;
    font-size: 0.82em;
    font-weight: 400;
    color: var(--mm-text-light);
    margin-top: 2px;
}

.sess-stepper-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sess-step-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--mm-border);
    background: white;
    font-size: 1.3em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mm-purple);
    font-family: var(--mm-font);
    transition: all 0.15s;
}

.sess-step-btn:hover { border-color: var(--mm-purple); background: var(--mm-bg); }
.sess-step-btn:active { transform: scale(0.9); }

.sess-step-val {
    width: 36px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1em;
    border: none;
    background: none;
    color: var(--mm-text);
    font-family: var(--mm-font);
    -moz-appearance: textfield;
    appearance: textfield;
}
.sess-step-val::-webkit-outer-spin-button,
.sess-step-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Sticky Footer ─────────────────────────────── */
.sess-sticky-spacer { height: 72px; }

.sess-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--mm-card);
    border-top: 1px solid var(--mm-border);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 50;
    max-width: 480px;
    margin: 0 auto;
}

.sess-footer-total {
    font-size: 0.95em;
    color: var(--mm-text);
}
.sess-footer-total strong {
    font-size: 1.2em;
    color: var(--mm-purple);
}

.sess-footer-btn {
    background: linear-gradient(135deg, var(--mm-red), var(--mm-red-dark));
    color: white;
    font-weight: 700;
    font-size: 1em;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: var(--mm-font);
    box-shadow: 0 4px 12px rgba(179, 28, 15, 0.25);
    transition: all 0.2s;
}
.sess-footer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(179, 28, 15, 0.35);
}
