/*
 * Brand stylesheet — unified look for the Dash web UI.
 *
 * The colour palette and visual hierarchy mirror the PDF export
 * so the user sees one consistent brand identity.
 *
 * Navy  : #002D72   (headers, accents)
 * Red   : #C8102E   (banner accent line)
 * Light : #f5f6fa   (card backgrounds, alternating rows)
 * Mid   : #dcdde1   (borders, dividers)
 */

/* ── Reset & base ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    color: #333;
    margin: 0;
}

/* ── Brand banner ────────────────────────────────────────────────── */
.brand-banner {
    background: linear-gradient(135deg, #002D72 0%, #001a45 100%);
    border-bottom: 3px solid #C8102E;
    padding: 20px 0 16px;
    margin-bottom: 0;
    position: relative;
}
.brand-banner h1 {
    color: white;
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0;
    letter-spacing: 0.8px;
}
.brand-banner .subtitle {
    color: #8eafd4;
    font-size: 0.82rem;
    margin-top: 3px;
    letter-spacing: 0.3px;
}

/* ── Toolbar row (selector + PDF button) ─────────────────────────── */
.toolbar-row {
    background: white;
    border-bottom: 1px solid #dcdde1;
    padding: 12px 0;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.toolbar-label {
    display: block;
    margin-bottom: 4px;
    color: #002D72;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2px;
}

/* ── Section labels (match PDF _section_label) ───────────────────── */
.section-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #002D72;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    border-bottom: 2px solid #dcdde1;
    padding-bottom: 5px;
    margin: 22px 0 10px;
}
.section-label:first-child {
    margin-top: 0;
}

/* ── Cards — navy header (mirrors PDF table headers) ─────────────── */
.card-navy {
    border: 1px solid #dcdde1;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 0;
    height: 100%;
}
.card-navy .card-header {
    background: linear-gradient(135deg, #002D72 0%, #003a8c 100%);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 7px 12px;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #C8102E;
}
.card-navy .card-body {
    padding: 12px;
    background-color: white;
}

/* ── Controls panel ──────────────────────────────────────────────── */
.controls-panel {
    background: white;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    padding: 12px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.controls-panel label {
    color: #002D72;
    font-size: 0.85rem;
}
.controls-panel .form-check-label,
.controls-panel label[for] {
    font-size: 0.82rem;
}

/* ── PDF download button ─────────────────────────────────────────── */
.btn-brand {
    background: linear-gradient(135deg, #002D72 0%, #003a8c 100%);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
}
.btn-brand:hover {
    background: linear-gradient(135deg, #001a45 0%, #002D72 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 45, 114, 0.3);
}
.btn-brand:active {
    transform: translateY(0);
}
.btn-brand-outline {
    background: white;
    border: 1px solid #002D72;
    color: #002D72;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 8px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
}
.btn-brand-outline:hover {
    background: #002D72;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 45, 114, 0.2);
}
.btn-brand-outline:active {
    transform: translateY(0);
}

/* ── Content wrapper ─────────────────────────────────────────────── */
.content-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.app-footer {
    text-align: center;
    color: #999;
    font-size: 0.75rem;
    font-style: italic;
    padding: 16px 0 10px;
    border-top: 1px solid #dcdde1;
    margin-top: 28px;
}

/* ── Dash DataTable tweaks ───────────────────────────────────────── */
.dash-spreadsheet-container .dash-header {
    font-size: 0.82rem !important;
}

/* ── Plotly graph card — remove extra padding ────────────────────── */
.card-navy .js-plotly-plot {
    margin: 0 auto;
}

/* ── Row gaps — Bootstrap override for consistent spacing ────────── */
.row.gx-3 > [class^="col"] {
    padding-left: 8px;
    padding-right: 8px;
}

/* ── Player info styling ─────────────────────────────────────────── */
.player-photo img {
    border-radius: 6px;
    border: 2px solid #dcdde1;
}
.bio-grid {
    display: flex;
    gap: 10px;
    font-size: 0.88rem;
    text-align: left;
    justify-content: flex-start;
}
.bio-col-labels {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bio-col-values {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bio-label {
    font-weight: bold;
    color: #002D72;
    white-space: nowrap;
}
.bio-value {
    color: #333;
}

/* ── Responsive tweaks ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .brand-banner h1 { font-size: 1.2rem; }
    .section-label   { font-size: 0.75rem; }
    .controls-panel  { padding: 10px 12px; }
}
