/* ==========================================
   REFEREE PROFILE PAGE
   ========================================== */

/* ═══ Page Container ═══ */
.referee-page-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 24px 15px;
}

/* ═══ Hero Card (Figma 40000391:11522 — dark banner, radius 14px,
      padding 20px 48px, min-height 194px; gradient over the shared
      stadium backdrop used by the app banner / player hero) ═══ */
.referee-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 194px;
    padding: 20px 48px;
    margin-bottom: 24px;
    border-radius: var(--border-radius-card);
    background-color: var(--bg-topbar);
    background-image:
        var(--bg-app-banner-overlay),
        url('../images/app-banner-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Identity left, info bar right (Figma 11565 @ x61 / 11790 @ x502) */
.referee-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

/* Identity block: photo + name column (Figma row, gap 16px, padding 10px) */
.referee-hero-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
    min-width: 0;
}

/* Circular photo (Figma layout_TZC1P5 — 88×88, radius ≈ circle) */
.referee-hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Name + subtitle column (Figma 40000391:11789 — column, gap 10px) */
.referee-hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

/* Montserrat/ExtraBold 18 */
.referee-hero-name {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: 800;
    line-height: 1.22;
    color: var(--text-white);
    overflow-wrap: anywhere;
}

/* Montserrat/SemiBold 11 — "Referee · 38 Years" */
.referee-hero-subtitle {
    margin: 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-xs);
    font-weight: 600;
    line-height: 1.22;
    color: var(--text-white);
}

/* Info bar (Figma 40000391:11790 — row, gap 16px, padding 16px 12px,
   bg fill_DQHSHI, 1px fill_0QA7GE border, radius 8px) */
.referee-hero-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Item columns (Figma layout_73IJ7M — column, gap 8px, ~70px wide) */
.referee-hero-info-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 70px;
    text-align: center;
}

/* style_9CRQYA label (8px in Figma → site minimum --font-size-xs,
   same mapping as .player-hero-info-label) */
.referee-hero-info-label {
    font-size: var(--font-size-xs);
    line-height: 1.2;
    color: var(--text-muted);
}

/* Body/Sm: Medium 12 value */
.referee-hero-info-value {
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Hairline dividers (Figma Vector 3/4/5 — 1×20px, fill_L0OGJN) */
.referee-hero-info-sep {
    width: 1px;
    height: 20px;
    background: var(--border-strong);
    flex-shrink: 0;
}

/* ═══ Section Labels (Figma div.events-filter pill visual — static,
      non-interactive heading; active pill fill_7AS3P8, radius 20px,
      padding 6px 16px, Montserrat 700/12) ═══ */
.referee-matches-section {
    margin-bottom: 24px;
}

.referee-section-label {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    margin: 0 0 16px;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 700;
    line-height: 1.22;
    white-space: nowrap;
    color: var(--text-white);
    background: var(--accent-purple-dark);
    border-radius: var(--border-radius-pill);
}

/* ═══ League Cards (Figma 40000642:11102 — bg fill_DQHSHI,
      1px fill_0QA7GE border, radius 14px; header band fill_DKPT20
      with bottom hairline, padding 12px 16px, gap 12px) ═══ */
.referee-league-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.referee-league-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-card);
    overflow: hidden;
}

.referee-league-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card-header);
    border-bottom: 1px solid var(--border-color);
}

/* League logo (Figma layout_PQ27V5 — 26×26) */
.referee-league-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Text md/Bold 16 league name */
.referee-league-name {
    margin: 0;
    min-width: 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-md);
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══ Fixture Rows (Figma Component 5 — padding 8px 16px, bottom
      hairline between rows; same visual language as
      .team-fixture-item in team.css) ═══ */
.referee-fixture-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

.referee-fixture-item:last-child {
    border-bottom: none;
}

.referee-fixture-item:hover {
    background: var(--bg-card-hover);
}

/* Team halves (Figma layout_ZTIFZG / layout_IXV3Z6 — row, gap 10px) */
.referee-fixture-team {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 0;
    min-width: 0;
}

.referee-fixture-team.home {
    justify-content: flex-end;
}

.referee-fixture-team.away {
    justify-content: flex-start;
}

/* Team crest (Figma layout_NOJCJS — 32×32) */
.referee-fixture-team img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Body/Sm: Medium 12 team name */
.referee-fixture-team-name {
    min-width: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center column (Figma layout_F2PRNH — column, centered, gap 4px) */
.referee-fixture-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 120px;
    padding: 2px 0;
}

/* Final score (style_H2P4FD — Montserrat 900/20, -2.5% tracking) */
.referee-fixture-score {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.22;
    color: var(--text-primary);
}

/* Kickoff time (Text sm/Bold 14 — Figma #B0B0C0 → --text-tertiary) */
.referee-fixture-time {
    font-family: var(--font-heading);
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* ═══ Responsive ═══ */
@media (max-width: 991.98px) {
    .referee-hero {
        padding: 20px 28px;
    }
}

@media (max-width: 767.98px) {
    .referee-hero {
        min-height: 0;
        padding: 24px 20px;
    }

    /* Hero stacks: identity above info bar, both centered */
    .referee-hero-inner {
        flex-direction: column;
        justify-content: center;
        gap: 16px;
    }

    .referee-hero-identity {
        flex-direction: column;
        text-align: center;
    }

    .referee-hero-text {
        align-items: center;
        text-align: center;
    }

    .referee-fixture-center {
        min-width: 96px;
    }
}

@media (max-width: 575.98px) {
    .referee-hero-avatar {
        width: 76px;
        height: 76px;
    }

    /* Info strip: allow wrap, drop hairline (player.css pattern) */
    .referee-hero-info {
        gap: 12px 20px;
    }

    .referee-hero-info-sep {
        display: none;
    }

    .referee-fixture-item {
        padding: 8px 12px;
    }

    .referee-fixture-center {
        min-width: 84px;
    }

    .referee-fixture-score {
        font-size: var(--font-size-md);
    }

    .referee-league-card-header {
        padding: 10px 12px;
    }
}
