/*
 * Inner public pages and sign-in pages for the Scoreboard and Clubhouse themes
 * (body.ps-scoreboard / body.ps-clubhouse). Loaded after the page styles and the
 * modern refine layer, so plain selectors win. Colours stay the modern tokens
 * (venue colour, black dark mode); this sheet changes shape, type and weight.
 */

/* ---- Shape tokens used by modern/public-refine.php ---- */
body.ps-scoreboard {
    --m-r-lg: 12px;
    --m-r-md: 8px;
    --m-sh-sm: none;
    --m-sh-md: none;
    --m-sh-brand: none;
}
body.ps-clubhouse {
    --m-r-lg: 22px;
    --m-r-md: 16px;
    --m-sh-sm: none;
    --m-sh-brand: none;
}

/* No tinted washes behind page headers. */
body:is(.ps-scoreboard, .ps-clubhouse) .page-header { background: none; }

/* ---- Headings ---- */
body:is(.ps-scoreboard, .ps-clubhouse) :is(.page-header h1, .page-title, h1.section-title, .section-title, .auth-heading) {
    font-family: var(--font-heading, inherit);
    font-style: normal;
}
body.ps-scoreboard :is(.page-header h1, .page-title) { font-weight: 700; letter-spacing: -0.01em; line-height: 0.98; }
body.ps-clubhouse :is(.page-header h1, .page-title) { font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
body.ps-scoreboard .auth-heading { font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -0.01em; }
body.ps-clubhouse .auth-heading { font-weight: 800; font-size: 1.75rem; line-height: 1.05; letter-spacing: -0.02em; }

/* ---- Scoreboard: numbers read like a scoreboard ---- */
body.ps-scoreboard :is(.rate, .price, .session-price, .event-fee, .session-date-badge, .event-date) {
    font-family: 'Barlow Semi Condensed', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

/* ---- Buttons ---- */
body.ps-scoreboard :is(.cta-primary, .directions-btn, .btn-filled, .btn-outline, .auth-guest-btn) {
    border-radius: 8px;
    box-shadow: none;
}
body.ps-clubhouse :is(.cta-primary, .directions-btn, .btn-filled, .btn-outline, .auth-guest-btn) {
    border-radius: 999px;
    box-shadow: none;
}
body:is(.ps-scoreboard, .ps-clubhouse) .cta-primary:hover { transform: none; }

/* ---- Cards and pills ---- */
body:is(.ps-scoreboard, .ps-clubhouse) :is(.session-card, .event-card):hover { transform: none; box-shadow: none; border-color: var(--court-green); }
body.ps-scoreboard .amenity-pill { border-radius: 6px; }
body.ps-clubhouse .amenity-pill { border-radius: 999px; }

/* ---- Sign-in pages ---- */
body.ps-scoreboard .auth-card { border-radius: 12px; box-shadow: none; }
body.ps-clubhouse .auth-card { border-radius: 24px; box-shadow: none; }
body.ps-scoreboard :is(.form-input, .auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="tel"], .auth-card input[type="password"]) { border-radius: 8px; }
body.ps-clubhouse :is(.form-input, .auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="tel"], .auth-card input[type="password"]) { border-radius: 14px; }
.auth-why { color: var(--text-muted); font-size: 0.95rem; line-height: 1.45; }

/* ---- Open Play cards (shared/open-play-session-card.php) ---- */
body.ps-scoreboard .opc { border-radius: 12px; box-shadow: none; }
body.ps-scoreboard .opc__time {
    font-family: 'Barlow Semi Condensed', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
body.ps-scoreboard :is(.opc__price, .court-card-rate) {
    font-family: 'Barlow Semi Condensed', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}
body.ps-clubhouse .opc { border-radius: 22px; box-shadow: none; }
body.ps-clubhouse .opc__time { font-family: var(--font-heading, inherit); font-weight: 800; letter-spacing: -0.02em; }
body.ps-clubhouse .opc__cta { border-radius: 999px; }
body.ps-scoreboard .opc__cta { border-radius: 8px; }

/* ---- Court cards (public/courts) ---- */
body.ps-scoreboard .court-card { border-radius: 12px; box-shadow: none; }
body.ps-scoreboard .court-card-name { font-family: 'Barlow Semi Condensed', system-ui, sans-serif; font-weight: 700; font-size: 1.45rem; }
body.ps-clubhouse .court-card { border-radius: 22px; box-shadow: none; overflow: hidden; }
body.ps-clubhouse .court-card-name { font-family: var(--font-heading, inherit); font-weight: 800; letter-spacing: -0.02em; }
body:is(.ps-scoreboard, .ps-clubhouse) .court-card:hover { transform: none; box-shadow: none; }

/* The "All 4 courts…" intro box repeats the page header; let it read as plain text. */
body:is(.ps-scoreboard, .ps-clubhouse) .intro-note { background: none; border: 0; padding: 0; }

/* ======================================================================
   Inner pages wear the same frame as the themed home: page colours,
   header, title area and footer (public-layout-start / -end markup).
   ====================================================================== */
body:is(.ps-scoreboard, .ps-clubhouse) {
    --dark: #ffffff;
    --dark-surface: #f3f4f2;
    --dark-card: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e4e6e3;
    --text-primary: #0a0a0a;
    --text-muted: #5c615e;
    --text-dim: #6b706d;
    background: var(--dark);
    font-family: var(--font-body, system-ui, sans-serif);
}
body.ps-clubhouse { --dark-surface: #f1f2ef; --card-border: #e3e4e0; }
html[data-theme="dark"] body:is(.ps-scoreboard, .ps-clubhouse) {
    --dark: #000000;
    --dark-surface: #121212;
    --dark-card: #121212;
    --card-bg: #121212;
    --card-border: #2a2a2a;
    --text-primary: #ededed;
    --text-muted: #a3a3a3;
    --text-dim: #8f8f8f;
}
body:is(.ps-scoreboard, .ps-clubhouse)::before { display: none; }

/* Header: brand, then the links, actions on the right, like the home topbar. */
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav {
    background: color-mix(in srgb, var(--dark) 92%, transparent);
    border-bottom: 1px solid var(--card-border);
}
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-inner { height: 72px; gap: 28px; justify-content: flex-start; }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-logo { width: 38px; height: 38px; }
body.ps-scoreboard .public-nav-logo img { border-radius: 8px; }
body.ps-clubhouse .public-nav-logo img { border-radius: 12px; }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-title { font-size: 1.05rem; font-weight: 600; }
body.ps-clubhouse .public-nav-title { font-family: var(--font-heading, inherit); font-weight: 700; letter-spacing: -0.01em; }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-links { flex: 1; gap: 24px; }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-links a { font-size: 0.95rem; }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-links a:hover,
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-links a.is-active { color: var(--text-primary); }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-links .sep { margin-left: auto; background: transparent; }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-links a.btn-filled { color: var(--court-green-on, #fff); }
body:is(.ps-scoreboard, .ps-clubhouse) .public-nav-links a.btn-filled { padding: 0.7rem 1.15rem !important; font-size: 0.95rem !important; }
body:is(.ps-scoreboard, .ps-clubhouse) .btn-filled:hover { transform: none; background: var(--court-green); }

/* Title area: no tinted band, the theme's big heading. */
body:is(.ps-scoreboard, .ps-clubhouse) .page-header {
    background: none;
    border-bottom: 0;
    padding: 2.5rem 0 1.25rem;
}
body:is(.ps-scoreboard, .ps-clubhouse) .page-header h1 { color: var(--text-primary); }
body.ps-scoreboard .page-header h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
body.ps-clubhouse .page-header h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
body:is(.ps-scoreboard, .ps-clubhouse) .page-header p.subtitle { font-size: 1.05rem; max-width: 62ch; }
body:is(.ps-scoreboard, .ps-clubhouse) .page-header .breadcrumbs { font-size: 0.85rem; }

/* Footer. */
body.ps-scoreboard .public-footer { background: var(--dark); border-top: 1px solid var(--card-border); }
body.ps-clubhouse .public-footer { background: var(--dark-surface); border-top: 0; }
body:is(.ps-scoreboard, .ps-clubhouse) .public-footer a.footer-link:hover { color: var(--text-primary); }
body:is(.ps-scoreboard, .ps-clubhouse) .public-footer .col-title { text-transform: none; letter-spacing: 0; font-size: 0.95rem; }
