/* Agent Arena — global design tokens + reset + true cross-cutting utilities.
   Per-component CSS lives in {Component}.razor.css (scoped via CSS isolation).
   Tokens sourced from AgentArena.Documentation/Mock/LeaderboardPivot/*.html. */

:root {
    --brand-blue: #004bbb;
    --brand-blue-dark: #003d96;
    --brand-blue-50: #eff6ff;
    --brand-blue-100: #e6f0ff;
    --brand-blue-200: #cce0ff;
    --brand-dark-grey: #555350;
    --grey-100: #f8f9fa;
    --grey-200: #e9ecef;
    --grey-300: #dee2e6;
    --grey-500: #adb5bd;
    --grey-600: #6c757d;
    --grey-700: #495057;
    --grey-900: #212529;
    --surface-light: #f8f9fa;
    --success-green: #2e8540;
    --error-red: #d83933;
    --warning-yellow: #fdb81e;
    --gold: #d4a85a;
    --text-primary: var(--brand-dark-grey);
    --text-secondary: #6e6b67;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 14px 30px rgba(0, 30, 80, 0.10);
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'PT Sans', sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 14px;
    --radius-pill: 999px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 62.5%; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-primary);
    font-size: 1.6rem;
    color: var(--text-primary);
    background: var(--surface-light);
    line-height: 1.5;
    min-height: 100vh;
}

/* MainLayout's outer wrapper. Flex column so the footer sticks to the bottom
   even on short pages (auth pages, error pages) — the .page wrapper inside
   each auth screen uses flex:1 to fill the empty space between nav + footer. */
.aa-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.aa-app > main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Shared `.page` flex wrapper used by every auth-card page (login,
   login-verify, register, register-verify) to vertically center the
   card in the viewport. Mirrors AgentArena.Documentation/Mock/
   LeaderboardPivot/login.html .page block. */
.page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2.4rem;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

/* App boot splash (replaced once Blazor takes over #app) */
.app-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Blazor framework error UI styling */
#blazor-error-ui {
    background: var(--error-red);
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 1.2rem 2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui[hidden] { display: none !important; }
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1.2rem;
    top: 0.6rem;
    font-size: 2.4rem;
    color: #fff;
}

/* === Shared button utilities (used in 3+ components: nav, auth-card, plan-grid) ===
   Matches the LeaderboardPivot mock's `.aa-btn` rule verbatim. Earlier this
   class had `display: inline-flex; gap: 0.6rem` to support icon buttons,
   but that broke inline `<sup>&reg;</sup>` rendering — "Realtor®" turned
   into "Realtor ® " because the superscript became a flex item with its
   own 0.6rem gap. For icon buttons use `.aa-btn-icon` (below). */
.aa-btn {
    padding: 0.7rem 1.4rem;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.02em;
    transition: all .15s ease;
    border: 1px solid transparent;
    line-height: 1.4;
}

.aa-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.aa-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.aa-btn-outline { background: transparent; border-color: var(--brand-blue); color: var(--brand-blue); }
.aa-btn-outline:hover:not(:disabled) { background: var(--brand-blue-50); }
.aa-btn-solid { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
.aa-btn-solid:hover:not(:disabled) { background: var(--brand-blue-dark); border-color: var(--brand-blue-dark); }
.aa-btn-ghost { background: transparent; color: var(--text-secondary); border: none; }
.aa-btn-ghost:hover:not(:disabled) { color: var(--brand-blue); }

.aa-icon-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark-grey);
    border-radius: 50%;
    text-decoration: none;
    padding: 6px;
    transition: all .15s ease;
    background: transparent;
    border: none;
}
.aa-icon-btn svg { width: 100%; height: 100%; fill: currentColor; }
.aa-icon-btn:hover { background: var(--grey-200); color: var(--brand-blue); }

/* Page-level container */
.aa-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2.4rem;
}

/* Screen-reader-only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
