/* ==========================================================================
   P2P.css - Path To Performance / SuperFan black theme
   Loaded by INSIGHT/Pro/Pro.Master after Pro.css. Every P2P page shares it.

   Tokens        : --p2p-* on :root (change a colour here, not in a page)
   p2p-page      : outer wrapper for a page's content
   p2p-subnav    : SCHEDULE / STANDINGS / TEAM / LEAGUE row (phones only)
   p2p-filters   : row of filter dropdowns (DropDownLists get CssClass="p2p-select")
   p2p-title     : page heading
   p2p-stats     : row of stat tiles (p2p-stat > p2p-stat-value + p2p-stat-label)
   p2p-day       : date heading above a group of meet cards
   p2p-meet      : meet card in the schedule list
   p2p-hero      : meet header on the meet view
   p2p-btn       : pill button (p2p-btn-primary for the one main action)
   p2p-tabs      : segmented control (LinkButtons, active one gets "p2p-tab is-active")
   p2p-panel     : dark card that holds a table
   p2p-table     : GridView skin (GridLines="None"). Column helpers:
                   p2p-col-name, p2p-col-num, p2p-col-total, p2p-col-img, p2p-hide-sm
   p2p-notice    : centred message card (not available, no scores yet)
   p2p-docs      : meet document download list
   ========================================================================== */

:root {
    --p2p-bg: #000000;
    --p2p-surface: #111114;
    --p2p-surface-2: #1a1a1f;
    --p2p-border: #26262c;
    --p2p-border-strong: #3f3f46;
    --p2p-text: #f4f4f5;
    --p2p-muted: #a1a1aa;
    --p2p-faint: #71717a;
    --p2p-gold: #fbbf24;      /* names, scores, highlights */
    --p2p-gold-soft: #fde68a;
    --p2p-brand: #6d28d9;     /* active control */
    --p2p-brand-hover: #7c3aed;
    --p2p-up: #4ade80;
    --p2p-down: #f87171;
    --p2p-radius: 12px;
    --p2p-pill: 999px;
}

body {
    background-color: var(--p2p-bg);
    color: var(--p2p-text);
}

.p2p-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4px 12px 32px;
    font-size: 15px;
}

.p2p-page a { color: var(--p2p-gold); }
.p2p-page a:hover, .p2p-page a:focus { color: var(--p2p-gold-soft); text-decoration: none; }
.p2p-muted { color: var(--p2p-muted); }
.p2p-gold { color: var(--p2p-gold); }

/* ---------- Sub navigation (phones) ---------- */
.p2p-subnav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}

.p2p-subnav a {
    display: block;
    padding: 8px 4px;
    border: 1px solid var(--p2p-border-strong);
    border-radius: var(--p2p-pill);
    color: var(--p2p-text) !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-align: center;
}

.p2p-subnav a.is-active { background: var(--p2p-brand); border-color: var(--p2p-brand); }

@media (min-width: 992px) { .p2p-subnav { display: none; } }

/* ---------- Filters ---------- */
.p2p-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.p2p-filters-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 767px) {
    .p2p-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .p2p-filters-2 { grid-template-columns: 1fr; }
}

.p2p-select {
    width: 100%;
    height: 40px;
    padding: 0 34px 0 12px;
    background-color: var(--p2p-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    border: 1px solid var(--p2p-border-strong);
    border-radius: 10px;
    color: var(--p2p-text);
    font-size: 14px;
    text-overflow: ellipsis;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.p2p-select:hover { border-color: var(--p2p-faint); }
.p2p-select:focus { outline: none; border-color: var(--p2p-brand-hover); box-shadow: 0 0 0 3px rgba(124, 58, 237, .35); }
.p2p-select option { background: var(--p2p-surface); color: var(--p2p-text); }

/* ---------- Headings ---------- */
.p2p-title {
    margin: 8px 0 16px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: .08em;
    text-align: center;
    color: var(--p2p-text);
}

.p2p-footnote { margin: 8px 0 0; color: var(--p2p-faint); font-size: 12px; font-style: italic; text-align: center; }

/* ---------- Stat tiles ---------- */
.p2p-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 767px) { .p2p-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.p2p-stat {
    padding: 12px 8px;
    background: var(--p2p-surface);
    border: 1px solid var(--p2p-border);
    border-radius: var(--p2p-radius);
    text-align: center;
}

.p2p-stat-value { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--p2p-gold); font-variant-numeric: tabular-nums; }
.p2p-stat-label { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--p2p-muted); }

@media (max-width: 767px) { .p2p-stat-value { font-size: 20px; } }

/* ---------- Schedule list ---------- */
.p2p-day {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 10px;
    color: var(--p2p-gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.p2p-day::after { content: ""; flex: 1; height: 1px; background: var(--p2p-border); }

.p2p-meet {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-bottom: 10px;
    padding: 14px;
    background: var(--p2p-surface);
    border: 1px solid var(--p2p-border);
    border-radius: var(--p2p-radius);
    transition: border-color .15s ease;
}

.p2p-meet:hover { border-color: var(--p2p-border-strong); }

.p2p-logo {
    width: 84px;
    height: 84px;
    padding: 6px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
}

.p2p-meet-time { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--p2p-muted); }
.p2p-meet-name { display: block; margin: 2px 0 4px; font-size: 19px; font-weight: 700; line-height: 1.25; }
.p2p-meet-where { font-size: 13px; color: var(--p2p-muted); }

.p2p-meet-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--p2p-muted);
}

.p2p-meet-facts b { color: var(--p2p-text); font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 767px) {
    .p2p-meet { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .p2p-logo { width: 56px; height: 56px; padding: 4px; }
    .p2p-meet-name { font-size: 16px; }
}

/* ---------- Meet header ---------- */
.p2p-hero {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    background: var(--p2p-surface);
    border: 1px solid var(--p2p-border);
    border-radius: var(--p2p-radius);
}

.p2p-hero .p2p-logo { width: 96px; height: 96px; }
.p2p-hero-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p2p-muted); }
.p2p-hero-title { margin: 2px 0 4px; font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--p2p-text); }
.p2p-hero-actions { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 767px) {
    .p2p-hero { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .p2p-hero .p2p-logo { width: 64px; height: 64px; }
    .p2p-hero-title { font-size: 19px; }
    .p2p-hero-actions { grid-column: 1 / -1; flex-direction: row; }
    .p2p-hero-actions .p2p-btn { flex: 1; }
}

/* ---------- Buttons ---------- */
.p2p-btn,
.p2p-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 16px;
    border: 1px solid var(--p2p-border-strong);
    border-radius: var(--p2p-pill);
    background: transparent;
    color: var(--p2p-text) !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.p2p-btn:hover, .p2p-btn:focus { border-color: var(--p2p-faint); background: var(--p2p-surface-2); color: var(--p2p-text) !important; }
.p2p-btn svg { width: 16px; height: 16px; }
.p2p-btn-primary, .p2p-btn-primary:visited { background: var(--p2p-brand); border-color: var(--p2p-brand); }
.p2p-btn-primary:hover, .p2p-btn-primary:focus { background: var(--p2p-brand-hover); border-color: var(--p2p-brand-hover); }

/* ---------- Segmented tabs ---------- */
.p2p-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin: 16px 0 12px;
    padding: 4px;
    background: var(--p2p-surface);
    border: 1px solid var(--p2p-border);
    border-radius: var(--p2p-pill);
}

.p2p-tab,
.p2p-tab:visited {
    display: block;
    padding: 9px 4px;
    border-radius: var(--p2p-pill);
    color: var(--p2p-muted) !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: center;
}

.p2p-tab:hover, .p2p-tab:focus { color: var(--p2p-text) !important; background: var(--p2p-surface-2); }
.p2p-tab.is-active, .p2p-tab.is-active:hover { background: var(--p2p-brand); color: #ffffff !important; }

/* ---------- Table panel ---------- */
.p2p-panel {
    margin-bottom: 16px;
    padding: 4px 12px;
    background: var(--p2p-surface);
    border: 1px solid var(--p2p-border);
    border-radius: var(--p2p-radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.p2p-panel-title { margin: 12px 0 4px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--p2p-muted); }

.p2p-table { width: 100%; border: 0 !important; border-collapse: collapse; background: transparent; }

.p2p-table th,
.p2p-table td {
    padding: 10px 6px;
    border: 0 !important;
    border-bottom: 1px solid var(--p2p-border) !important;
    text-align: center;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.p2p-table tr:last-child td { border-bottom: 0 !important; }

.p2p-table th {
    padding-top: 12px;
    color: var(--p2p-faint);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.p2p-table tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.p2p-table td.p2p-col-name, .p2p-table th.p2p-col-name { text-align: left; }
.p2p-col-name a { font-weight: 700; }
.p2p-col-sub { display: block; font-size: 12px; color: var(--p2p-muted); }
.p2p-col-sub a { color: var(--p2p-muted) !important; font-weight: 400; }
.p2p-col-num { width: 72px; }
.p2p-col-total { width: 84px; color: var(--p2p-gold); font-weight: 800; }
.p2p-col-img { width: 64px; }
.p2p-col-img img { width: 48px; height: 48px; padding: 3px; object-fit: contain; border-radius: 8px; background: #ffffff; }
.p2p-rank { display: inline-block; min-width: 26px; color: var(--p2p-faint); font-weight: 700; }
.p2p-behind { display: block; font-size: 11px; font-weight: 400; color: var(--p2p-muted); }

@media (max-width: 767px) {
    .p2p-table th, .p2p-table td { padding: 8px 4px; font-size: 13px; }
    .p2p-col-num { width: auto; }
    /* !important: Pro.css (Bootstrap) has table td[class*="col-"] { display: table-cell } which matches p2p-col-* */
    .p2p-hide-sm { display: none !important; }
}

/* ---------- Notice + empty ---------- */
.p2p-notice {
    padding: 40px 16px;
    background: var(--p2p-surface);
    border: 1px dashed var(--p2p-border-strong);
    border-radius: var(--p2p-radius);
    color: var(--p2p-muted);
    text-align: center;
}

.p2p-panel .p2p-notice { margin: 8px 0; border: 0; background: transparent; }
.p2p-panel .p2p-table td:only-child { border: 0 !important; }

.p2p-notice svg { width: 28px; height: 28px; margin-bottom: 8px; color: var(--p2p-faint); }
.p2p-notice b { display: block; margin-bottom: 4px; color: var(--p2p-text); font-size: 16px; }

/* ---------- Meet documents ---------- */
.p2p-docs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.p2p-docs:empty { display: none; }

/* ---------- Toolbar row above a table ---------- */
.p2p-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.p2p-toolbar > * { flex: 1 1 220px; }
