﻿/* ═══════════════════════════════════════════════════════════════
   UMPIRE PORTAL CSS  —  Twilight-navy redesign (Style B)
   Used by: UmpirePortal.razor, UmpireCourtPortal.razor, UmpireDashboard.razor
   ───────────────────────────────────────────────────────────────
   Matches the app's Twilight gradient but on a deeper navy base, so
   these selection/navigation screens feel like the product yet hand
   off smoothly into the navy live-scoring page (which keeps its own
   stylesheet). Class names are unchanged from the original — this is
   a pure restyle, no markup edits.

   Functional colours are preserved:
     green  = live / now / resume
     blue   = upcoming
     violet = brand accent (codes, avatars, primary "Start")
   =============================================================== */

.ucp-root {
    min-height: 100vh;
    /* Twilight gradient over a deep navy base */
    background: radial-gradient(700px 460px at 8% -6%, rgba(126, 111, 255, 0.16), transparent 64%), radial-gradient(700px 520px at 100% 102%, rgba(56, 150, 255, 0.12), transparent 70%), #0a1422;
    color: #fff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* ── Header ── */
.ucp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(10, 16, 28, 0.55);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 5;
}

.ucp-header-left {
    display: flex;
    align-items: center;
    gap: 11px;
}

/* Logo becomes a small violet brand badge */
.ucp-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, #5a4fd6, #9080ff);
    display: grid;
    place-items: center;
    font-size: 17px;
    box-shadow: 0 6px 16px rgba(126, 111, 255, 0.3);
}

.ucp-tournament-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.ucp-court-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.ucp-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}

/* ── Tournament context bar (sits under the header) ── */
.ucp-context-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(126, 111, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 12.5px;
    font-weight: 600;
    color: #cbc4ff;
}

.ucp-context-ic {
    font-size: 13px;
}

/* ── Section label ── */
.ucp-section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    padding: 16px 16px 7px;
    text-transform: uppercase;
}

/* ── Match cards ── */
.ucp-match-card {
    position: relative;
    overflow: hidden;
    margin: 0 14px 10px;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #122031;
    --st: rgba(255, 255, 255, 0.18);
}
    /* status accent stripe down the left edge */
    .ucp-match-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: var(--st);
    }

.ucp-match-now {
    --st: #22c55e;
    border-color: rgba(34, 197, 94, 0.28);
    background: linear-gradient(rgba(34, 197, 94, 0.06), rgba(34, 197, 94, 0.06)), #122031;
}

.ucp-match-next {
    --st: #3b82f6;
    border-color: rgba(255, 255, 255, 0.08);
}

.ucp-match-done {
    --st: rgba(255, 255, 255, 0.18);
    opacity: 0.55;
}

.ucp-match-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #9d90ff; /* brand violet — the code pops */
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ucp-match-court {
    color: rgba(255, 255, 255, 0.45);
    font-weight: 400;
}

.ucp-match-time {
    color: #fcd34d;
    font-weight: 400;
}

.ucp-match-event {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.ucp-match-round {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

.ucp-match-players {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 11px;
    margin-bottom: 12px;
}

.ucp-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.ucp-vs {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    font-weight: 400;
}

.ucp-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 3px 9px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

/* ── Buttons ── */
.ucp-btn {
    width: 100%;
    padding: 12px;
    border-radius: 11px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: filter 0.12s, transform 0.05s;
}

    .ucp-btn:active {
        transform: translateY(1px);
        filter: brightness(0.95);
    }

/* Start (not yet live) → brand violet primary */
.ucp-btn-start {
    background: #7e6fff;
    color: #fff;
    box-shadow: 0 6px 16px rgba(126, 111, 255, 0.3);
}

    .ucp-btn-start:hover {
        background: #9080ff;
    }

/* Resume (match is live) → green to signal "in progress" */
.ucp-btn-resume {
    background: #22c55e;
    color: #06210f;
}

    .ucp-btn-resume:hover {
        filter: brightness(1.05);
    }

.ucp-btn-outline {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

    .ucp-btn-outline:hover {
        background: rgba(255, 255, 255, 0.1);
    }

/* ── Empty / loading ── */
.ucp-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.ucp-empty {
    text-align: center;
    padding: 48px 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   PIN ENTRY / NAME SELECTION SCREEN
   =============================================================== */

.ucp-pin-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.ucp-pin-card {
    background: #122031;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 24px;
    width: 100%;
    max-width: 320px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

/* Brand badge instead of bare emoji */
.ucp-pin-logo {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    font-size: 24px;
    background: linear-gradient(135deg, #5a4fd6, #9080ff);
    box-shadow: 0 8px 22px rgba(126, 111, 255, 0.35);
}

.ucp-pin-tournament {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.ucp-pin-court {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 20px;
}

.ucp-pin-title {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 16px;
}

.ucp-pin-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ucp-pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    transition: all 0.15s;
}

    .ucp-pin-dot.filled {
        background: #7e6fff;
        border-color: #7e6fff;
        box-shadow: 0 0 10px rgba(126, 111, 255, 0.5);
    }

.ucp-pin-error {
    font-size: 12px;
    color: #f87171;
    margin-bottom: 10px;
    height: 16px;
}

.ucp-pin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-top: 8px;
}

.ucp-pin-key {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.1s;
}

    .ucp-pin-key:active {
        background: rgba(255, 255, 255, 0.18);
    }

.ucp-pin-ok {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
    font-size: 18px;
}

.ucp-pin-del {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-size: 16px;
}

/* ── Name selection buttons ── */
.ucp-name-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.12s;
}

    .ucp-name-btn:hover {
        border-color: rgba(126, 111, 255, 0.5);
        background: rgba(126, 111, 255, 0.08);
    }

    .ucp-name-btn:active {
        background: rgba(126, 111, 255, 0.14);
    }

.ucp-name-btn--selected {
    border-color: rgba(126, 111, 255, 0.6);
    background: rgba(126, 111, 255, 0.14);
}

.ucp-name-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #7e6fff;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ucp-name-btn--selected .ucp-name-avatar {
    background: #9080ff;
    color: #fff;
}

/* ── Umpire lock badge ── */
.ucp-locked-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 9px;
    padding: 8px 12px;
    margin-bottom: 16px;
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}
