/* =============================================================================
   Winnrs — brand palette: Charcoal & Copper (winnrs.co.uk/palette.png)
   ============================================================================= */
:root {
    --brand-charcoal:   #1F1F23;   /* primary — logo body */
    --brand-copper:     #E07A3F;   /* accent — logo border + arrow */
    --brand-white:      #FFFFFF;
    --brand-charcoal-2: #34343C;   /* lifted charcoal — hover / active */
    --brand-grey:       #6B6B73;   /* muted text */
}

/* Primary actions = charcoal, accent = copper ------------------------------- */
.btn-primary {
    background-color: var(--brand-charcoal);
    border-color: var(--brand-charcoal);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--brand-charcoal-2);
    border-color: var(--brand-charcoal-2);
    color: #fff;
}
.btn-outline-primary {
    color: var(--brand-charcoal);
    border-color: var(--brand-charcoal);
}
.btn-outline-primary:hover {
    background-color: var(--brand-charcoal);
    border-color: var(--brand-charcoal);
    color: #fff;
}
a, .btn-link { color: var(--brand-charcoal); }
a:hover { color: var(--brand-copper); }

/* =============================================================================
   Auth screens (login / register / confirm / forgot / reset)
   White background, logo top-centre, form centred. Mobile-first.
   ============================================================================= */
.auth-shell {
    min-height: 100vh;
    background: var(--brand-white);
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}
.auth-container {
    width: 100%;
    max-width: 400px;
    margin-top: 5vh;
}
.auth-wordmark {
    font-family: 'Bebas Neue', system-ui, sans-serif;
    color: var(--brand-copper);
    text-align: center;
    font-size: 2.6rem;
    letter-spacing: 0.12em;
    line-height: 1;
    margin-bottom: 0.6rem;
}

.auth-logo {
    display: block;
    width: 256px;
    max-width: 72%;
    height: auto;
    margin: 0 auto 1.5rem;
}
.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-charcoal);
    text-align: center;
    margin-bottom: 1.25rem;
}
.auth-card .btn-primary { width: 100%; }
.auth-links {
    text-align: center;
    margin-top: 1rem;
    font-size: .9rem;
}
.auth-muted { color: var(--brand-grey); }

/* =============================================================================
   User menu chip (initials, e.g. "SW") in the top bar
   ============================================================================= */
/* The initials are drawn as SVG text and centred with SVG's own baseline-aware centring
   (text-anchor:middle + dominant-baseline:central). This centres the actual GLYPHS — not the CSS
   line box — so capital letters (which have no descender and otherwise read high) sit dead-centre.
   It is immune to font metrics, line-height, Bootstrap/DevExpress and even brand.css caching, because
   the centring lives in the SVG attributes, not in CSS layout. */
.user-chip {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--brand-charcoal);
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    overflow: hidden;
}
.user-chip svg { display: block; width: 100%; height: 100%; }
.user-chip text {
    fill: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-anchor: middle;        /* horizontal centre */
    dominant-baseline: central; /* vertical centre on the glyphs themselves */
}
.user-chip:hover, .user-chip:focus { background: var(--brand-charcoal-2); outline: 0; }
.user-chip:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-charcoal); }
.user-chip::after { display: none !important; } /* belt-and-braces, in case .dropdown-toggle ever returns */

/* Click-to-reveal field help "(i)" */
.field-help { position: relative; display: inline-block; }
.field-help > i { cursor: pointer; color: var(--brand-grey); }
.field-help > i:hover { color: var(--brand-charcoal); }
.field-help-pop {
    position: absolute;
    left: 1.3rem;
    top: -0.25rem;
    z-index: 30;
    width: max-content;
    max-width: 240px;
    background: var(--brand-charcoal);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.35;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.dropdown-item.active, .dropdown-item:active { background-color: var(--brand-charcoal); }

/* Unread message row in the inbox */
.list-group-item.winnrs-unread { border-left: 3px solid var(--brand-copper); background: rgba(224, 122, 63, 0.07); }

/* My-games tiles — a soft grey so they're not a wall of white */
.card.winnrs-tile { background-color: #f0f0f2; }

/* Android "Install app" button — shown only when the browser has offered an install prompt */
#android-install { display: none; }
html.winnrs-installable #android-install { display: block; }

/* Pick screen: home | kick-off | away, kept perfectly aligned with a 3-column grid.
   align-items:stretch makes both team buttons in a row equal height even when one name wraps. */
.winnrs-pick-grid {
    display: grid;
    grid-template-columns: 1fr 3.5rem 1fr;
    gap: 0.5rem;
    max-width: 760px;
    align-items: stretch;
}
.winnrs-pick-grid .winnrs-pick-ko {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
    font-size: 0.72rem;
    color: var(--brand-grey);
}
.winnrs-pick-grid .btn {
    width: 100%;
    min-height: 3rem;          /* consistent tap target; rows line up */
    white-space: normal;       /* allow long names to wrap cleanly */
}

/* Header messages bell (left of the SW chip) */
.user-msg {
    color: var(--brand-charcoal);
    font-size: 1.2rem;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem;
}
.user-msg:hover { color: var(--brand-copper); }

/* Football icon (Games / My games) — sized to match the Bootstrap nav icons so labels line up */
.football-icon { vertical-align: -0.125em; }
.nav-link .football-icon { width: 1em; height: 1em; margin-right: 0.6rem; }
.bottom-nav .football-icon { width: 1.25rem; height: 1.25rem; }

/* "Best viewed in landscape" hint ------------------------------------------- */
/* Shown ONLY on narrow mobile-layout screens (< 992px, the app's phone mode)
   while held in portrait. The (orientation: portrait) query means it vanishes
   automatically the moment the phone is turned to landscape — no JS needed. */
.landscape-hint { display: none; }

@media (max-width: 991.98px) and (orientation: portrait) {
    .landscape-hint {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin-bottom: 1rem;
        padding: 0.55rem 0.85rem;
        border-radius: 0.5rem;
        background-color: var(--brand-charcoal);
        color: #fff;
        font-size: 0.9rem;
        line-height: 1.25;
    }
    .landscape-hint-icon {
        width: 1.6rem;
        height: 1.6rem;
        flex-shrink: 0;
        color: var(--brand-copper);
    }
    /* The phone glyph tips from portrait to landscape and back, hinting the action. */
    .lh-phone {
        transform-box: fill-box;
        transform-origin: center;
        animation: lh-rotate 2.8s ease-in-out infinite;
    }
}

@keyframes lh-rotate {
    0%, 22%   { transform: rotate(0deg); }
    48%, 72%  { transform: rotate(-90deg); }
    96%, 100% { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
    .lh-phone { animation: none; }
}

/* "Add to home screen" banner (InstallBanner.razor) — phones only ----------- */
/* Hidden everywhere by default; only laid out on the app's mobile layout
   (< 992px). This hard CSS gate means it can never appear on a desktop, no
   matter what a cached script does. When the C# component decides to show it,
   it renders <div class="install-banner">; this rule controls whether it's seen. */
.install-banner { display: none; }

@media (max-width: 991.98px) {
    .install-banner { display: flex; }
}

/* Goal flash — pulses the live score cell gold for a few seconds when a goal goes in. */
@keyframes winnrs-goal-pulse {
    0%, 100% { background-color: transparent; transform: scale(1); }
    25%      { background-color: var(--brand-copper); transform: scale(1.35); }
}
.winnrs-goal {
    display: inline-block;
    padding: 0 6px;
    border-radius: 6px;
    font-weight: 700;
    color: var(--brand-charcoal);
    animation: winnrs-goal-pulse 0.7s ease-in-out 6;
}
@media (prefers-reduced-motion: reduce) {
    .winnrs-goal { animation: none; background-color: var(--brand-copper); border-radius: 6px; padding: 0 6px; }
}
