/* For WebKit browsers (Chrome, Safari, Edge, Opera) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* For Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=Varela+Round&display=swap');

:root {
    --retro-cream: #fff5e6;
    --retro-red: #b23a48;
    --retro-maroon: #5c1d23;
    --retro-ink: #1b1b1b;
    --retro-gold: #f2c14e;
    --retro-muted: #6b5c4d;
    --retro-shadow: rgba(17, 16, 14, 0.18);
    --team-primary: #b23a48;
    --team-secondary: #f2c14e;
    --team-primary-faded: rgba(178, 58, 72, 0.12);
}

html {
    height: 100%;
}

.theme-retro {
    background: rgba(var(--team-primary-rgb), 0.25);
    color: var(--retro-ink);
    font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.theme-retro .app-navbar {
    background: var(--team-primary);
    border-bottom: 3px solid var(--team-secondary);
}

.theme-retro .brand-mark {
    background: var(--team-secondary);
    color: var(--retro-ink);
    border: 2px solid var(--retro-ink);
    border-radius: 8px;
    font-family: "Varela Round", system-ui, sans-serif;
    font-weight: 700;
    padding: 4px 10px;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 var(--retro-ink);
}

.theme-retro .brand-text {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--retro-cream);
}

.theme-retro .app-main {
    padding-bottom: 2rem;
    flex: 1;
}

.theme-retro h1,
.theme-retro h2,
.theme-retro h3,
.theme-retro h4,
.theme-retro h5,
.theme-retro h6,
.theme-retro .display-4 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--team-primary);
}

.theme-retro .card {
    border: 2px solid var(--team-secondary);
    border-radius: 12px;
    background: #fffaf0;
    box-shadow: 0 10px 20px var(--retro-shadow);
}

.theme-retro .card:hover {
    transform: translateY(-2px);
    transition: transform 140ms ease;
    border-color: var(--team-secondary);
}

.theme-retro .table {
    background: #fffaf0;
    border: 2px solid var(--team-secondary);
    border-radius: 12px;
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
}

.theme-retro .table thead {
    border-bottom: 2px solid var(--team-secondary);
}

.theme-retro .table tbody {
    border: 2px solid var(--team-secondary);
    border-top: none;
}

.theme-retro .table thead th {
    background: var(--team-primary);
    color: var(--retro-cream);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-retro .badge {
    background: var(--team-secondary);
    color: var(--retro-ink);
    border: 2px solid var(--team-primary);
    font-weight: 700;
}

.theme-retro .btn-primary {
    background: var(--team-primary);
    border: 2px solid var(--retro-ink);
    box-shadow: 0 4px 0 var(--retro-ink);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--retro-cream);
}

.theme-retro .btn-primary:hover {
    background: rgba(var(--team-primary-rgb), 0.8);
    border-color: var(--team-secondary);
    box-shadow: 0 4px 0 var(--retro-ink), inset 0 0 0 3px var(--team-secondary);
}

.theme-retro .btn-secondary {
    background: var(--team-secondary);
    color: var(--retro-ink);
    border: 2px solid var(--retro-ink);
    box-shadow: 0 4px 0 var(--retro-ink);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.theme-retro .btn-secondary:hover {
    background: rgba(var(--team-secondary-rgb), 0.8);
    border-color: var(--team-primary);
    box-shadow: 0 4px 0 var(--retro-ink), inset 0 0 0 3px var(--team-primary);
}

.theme-retro .btn-outline-primary {
    color: var(--team-primary);
    border: 2px solid var(--team-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.theme-retro .btn-outline-primary:hover {
    background: var(--team-secondary);
    color: var(--retro-ink);
    border-color: var(--team-primary);
}

.theme-retro .app-footer {
    background: var(--team-primary);
    border-top: 3px solid var(--team-secondary);
    color: var(--retro-cream);
    padding: 16px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    font-weight: 600;
}

.theme-retro .footer-mark {
    font-weight: 700;
    color: var(--team-secondary);
}

/* Additional primary color accents */
.theme-retro .nav-link {
    color: var(--retro-cream);
    font-weight: 600;
}

.theme-retro .nav-link:hover {
    color: var(--team-secondary);
    transition: color 150ms ease;
}

.theme-retro .btn-link.nav-link {
    color: var(--retro-cream);
    font-weight: 600;
}

.theme-retro .btn-link.nav-link:hover {
    color: var(--team-secondary);
    text-decoration: underline var(--team-secondary);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.theme-retro a {
    color: var(--team-primary);
    text-decoration: none;
}

.theme-retro a:hover {
    color: rgba(var(--team-primary-rgb), 0.7);
    text-decoration: underline var(--team-secondary);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Award badges */
.award-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.award-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.85rem;
    line-height: 1;
    border-radius: 50%;
    background-color: rgba(var(--team-primary-rgb), 0.10);
    border: 1px solid var(--team-secondary);
    cursor: help;
}

.award-badge:hover {
    background-color: rgba(var(--team-secondary-rgb), 0.30);
}

.award-icon-option {
    font-size: 1.1rem;
}

.award-picker-menu {
    max-height: 16rem;
    overflow-y: auto;
    min-width: 14rem;
}

.award-picker-toggle {
    min-width: 9rem;
    text-align: left;
}

.team-season-awards .award-badges {
    margin-left: 0;
}

/* Role badges sit in a gutter to the left of the name in roster tables. The gutter always
   reserves room for one badge so names stay aligned across rows that have no roles. */
.name-with-role-gutter {
    display: inline-flex;
    align-items: center;
    /* Keep the gutter, name and award badges on a single line. Wrapping made roster rows
       two lines tall on narrow screens; the table scrolls horizontally instead. */
    white-space: nowrap;
}

.role-badge-gutter {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    min-width: 1.5rem;
    margin-right: 0.35rem;
}

.role-badge-gutter .award-badges {
    margin-left: 0;
}

/* Wide stat tables scroll inside their own container rather than stretching the page, so the
   document never overflows horizontally and every table cell stays within the viewport. */
.theme-retro .table-responsive {
    margin-bottom: 1rem;
}

.theme-retro .table-responsive > .table {
    margin-bottom: 0;
}

/* Dropdown menus inside a table (the award/role pickers on the season editor) are rendered
   as siblings of their button, so the scroll container would otherwise clip them. Stop
   clipping while a menu is open; scrolling is not needed until it closes again. */
.table-responsive:has(.dropdown-menu.show) {
    overflow: visible;
}

/* Tables that scroll keep their own bottom margin off, so the wrapper supplies it. */
@media (max-width: 767.98px) {
    .theme-retro .table {
        font-size: 0.85rem;
    }

    .theme-retro .table > :not(caption) > * > * {
        padding: 0.4rem 0.5rem;
    }

    .theme-retro .table thead th {
        white-space: nowrap;
        font-size: 0.72rem;
        letter-spacing: 0.5px;
    }

    /* Stat cells hold short values, so keeping them on one line costs almost no width and
       stops single digits from stacking under their own headers. Only stat tables opt in;
       tables of free text still need to wrap. */
    .theme-retro .stat-table tbody td,
    .theme-retro .stat-table tfoot td {
        white-space: nowrap;
    }

    .award-badge {
        width: 1.35rem;
        height: 1.35rem;
        font-size: 0.78rem;
    }

    .theme-retro h1,
    .theme-retro .display-4 {
        font-size: 1.6rem;
    }

    .theme-retro h2 {
        font-size: 1.4rem;
    }

    .theme-retro h3 {
        font-size: 1.25rem;
    }

    .theme-retro h4 {
        font-size: 1.1rem;
    }

    .theme-retro h5,
    .theme-retro h6 {
        font-size: 1rem;
    }

    .theme-retro .app-footer {
        letter-spacing: 1px;
        font-size: 0.75rem;
    }
}

/* Badges are focusable so a tap can open their tooltip on touch devices, where there is
   no hover. The outline is suppressed in favour of the ring the theme already draws. */
.award-badge:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--team-secondary);
}

.tooltip {
    /* Long role tooltips ("Manager: Fall 2026, Spring 2026") must not run off a phone. */
    max-width: min(90vw, 20rem);
}
