/* PastForward: component classes for the Blazor pages (account, link, leaderboards, admin), in the
   hub's palette (wwwroot/assets/site.css). Utilities come from the built Tailwind file
   (css/tailwind.css, palette remapped in tailwind.config.js).

   QA 1 (2026-10): this file used to restate a subset of Tailwind's utilities (.flex-col, .hidden,
   .text-gray-900, ...). Loaded after tailwind.css, those copies beat the responsive variants
   (lg:flex-row lost to .flex-col, so the account sidebar sat on top of every page), and a global
   "*:focus { outline: none !important }" hid the keyboard focus everywhere. Both are gone. */

:root {
    --pf-void: #020204; --pf-panel: #0c0c12; --pf-panel2: #13131b; --pf-edge: #2a2833;
    --pf-bronze: #c9a063; --pf-gold: #e8c486; --pf-blue: #3f9dff; --pf-ice: #a9d4ff; --pf-blue-deep: #153a66;
    --pf-text: #ece6dc; --pf-dim: #b3aa9c; --pf-faint: #8a8276;
    --pf-play: linear-gradient(90deg, #c9a063, #e8c486 45%, #a9d4ff 55%, #3f9dff);
}

/* Opaque white surfaces are the panel colour (translucent bg-white/10 overlays stay white). */
.bg-white { background-color: var(--pf-panel); }

/* Blazor focuses the page title after navigation (FocusOnNavigate): no ring for that. */
[tabindex="-1"]:focus { outline: none; }

/* Page titles: Cinzel in gold, like the hub's headings. */
h1.text-gray-900, h1.text-gray-800 { color: var(--pf-gold); }

/* ---- Forms ---- */
.form-input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--pf-text);
    background-color: var(--pf-void);
    border: 1px solid var(--pf-edge);
    border-radius: 0.625rem;
}
.form-input:focus { outline: none; border-color: var(--pf-gold); box-shadow: 0 0 0 3px rgb(232 196 134 / 0.2); }
.form-input:disabled, .form-input[readonly] { color: var(--pf-dim); background-color: var(--pf-panel2); }
select.form-input { appearance: auto; }

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pf-text);
}

input[type=checkbox], input[type=radio] { accent-color: var(--pf-blue); width: 1.05rem; height: 1.05rem; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: filter 0.12s, background-color 0.12s, border-color 0.12s, color 0.12s;
    cursor: pointer;
    text-decoration: none;
}
.btn:disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--pf-play); color: #0b0906; }
.btn-primary:hover { filter: brightness(1.1); color: #000; }
.btn-secondary { background-color: var(--pf-panel); color: var(--pf-text); border-color: var(--pf-edge); }
.btn-secondary:hover { border-color: var(--pf-dim); color: #fff; }
.btn-danger { background-color: #8f2a20; color: #fff; border-color: #b4483a; }
.btn-danger:hover { background-color: #a8352a; }

/* ---- Navigation ---- */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pf-dim);
    border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--pf-text); border-bottom-color: var(--pf-edge); }
.nav-link.active { color: var(--pf-gold); border-bottom-color: var(--pf-gold); }

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pf-dim);
    border-radius: 0.5rem;
}
.admin-nav-link:hover { color: #fff; background-color: var(--pf-panel2); }
.admin-nav-link.active { color: #fff; background-color: var(--pf-blue-deep); }

/* Account sidebar (AccountLayout): a column on wide screens, a scrolling row of pills on phones. */
.account-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.625rem;
    color: var(--pf-dim);
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.account-nav-link:hover { background-color: var(--pf-panel2); color: var(--pf-text); }
.account-nav-link.active { background-color: var(--pf-panel2); color: var(--pf-gold); border-color: var(--pf-edge);
    box-shadow: inset 3px 0 0 var(--pf-bronze); }
@media (max-width: 1023px) {
    .pf-account-nav { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: thin; }
    .pf-account-nav > * + * { margin-top: 0 !important; }
    .pf-account-nav hr, .pf-account-nav .pf-nav-sep { display: none; }
    .account-nav-link { padding: 0.5rem 0.875rem; border-color: var(--pf-edge); font-size: 0.9375rem; }
    .account-nav-link.active { box-shadow: inset 0 -2px 0 var(--pf-bronze); }
}

/* ---- Cards ---- */
.card {
    background-color: var(--pf-panel);
    border: 1px solid var(--pf-edge);
    border-radius: 0.875rem;
    overflow: hidden;
}
.card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--pf-edge); }
.card-header h2, .card-header h3 { color: var(--pf-text); }
.card-body { padding: 1.5rem; }
@media (max-width: 640px) { .card-body { padding: 1.125rem; } .card-header { padding: 0.875rem 1.125rem; } }

.blog-content { line-height: 1.7; color: var(--pf-dim); }
.blog-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--pf-text); }
.blog-content h3 { font-size: 1.2rem; font-weight: 600; margin: 1.5rem 0 0.5rem; color: var(--pf-text); }
.blog-content p { margin: 0 0 1rem; }
.blog-content a { color: var(--pf-ice); text-decoration: underline; }
.blog-content ul, .blog-content ol { margin: 0 0 1rem 1.25rem; }
.blog-content li { margin: 0.25rem 0; }
.blog-content pre { background: var(--pf-panel2); padding: 1rem; border-radius: 0.5rem; overflow-x: auto; margin-bottom: 1rem; }
.blog-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

/* ---- Alerts ---- */
.alert { padding: 0.875rem 1rem; border-radius: 0.625rem; margin-bottom: 1rem; }
.alert-error { background-color: #2a0f0c; border: 1px solid #7a3a30; color: #ffb4a6; }
.alert-success { background-color: #0b2416; border: 1px solid #2f6b45; color: #9be3b4; }

/* ---- Site header / footer (Shared/SiteHeader.razor, SiteFooter.razor): the hub's, in Blazor ---- */
.pf-skip { position: absolute; left: -999px; top: 8px; background: var(--pf-gold); color: #111; padding: 10px 16px; border-radius: 8px; z-index: 60; }
.pf-skip:focus { left: 8px; }
.pf-rule { height: 1px; border: 0; margin: 0;
    background: linear-gradient(90deg, transparent, #c9a063 30%, #6e532d 49.5%, #153a66 50.5%, #3f9dff 70%, transparent); }
.pf-brand { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; color: var(--pf-text);
    font-family: Cinzel, Georgia, serif; font-weight: 700; font-size: 18px; letter-spacing: 0.06em; }
.pf-brand img { width: 40px; height: 40px; border-radius: 50%; }
.pf-brand .p { color: var(--pf-gold); } .pf-brand .f { color: var(--pf-ice); }
.pf-topnav a { text-decoration: none; color: var(--pf-dim); padding: 0.5rem 0.75rem; border-radius: 0.625rem; font-size: 16px; white-space: nowrap; }
.pf-topnav a:hover, .pf-topnav a.active { color: var(--pf-text); background: var(--pf-panel2); }
.pf-join { display: inline-flex; align-items: center; text-decoration: none; padding: 0.5rem 0.875rem; border-radius: 0.625rem;
    background: var(--pf-play); color: #0b0906; font-weight: 600; font-size: 16px; white-space: nowrap; }
.pf-join:hover { filter: brightness(1.1); color: #000; }
.pf-signin { color: var(--pf-dim); text-decoration: none; font-size: 16px; padding: 0.5rem 0.5rem; white-space: nowrap; }
.pf-signin:hover { color: #fff; }
.pf-footer { color: var(--pf-faint); font-size: 15px; }
.pf-footer a { color: var(--pf-dim); text-decoration: underline; text-underline-offset: 3px; }
.pf-footer a:hover { color: #fff; }
.pf-footer [data-footer="ltc"] p { margin: 0 0 4px; } /* PastForward: the LTC Labs lines */
@media (max-width: 640px) {
    .pf-brand .word { display: none; }
    .pf-topnav { order: 3; width: 100%; justify-content: space-between; }
    .pf-topnav a { padding: 0.5rem 0.5rem; font-size: 15px; }
}

/* ---- Sign-up and onboarding (Shared/EmailCode*.razor, Auth/Welcome.razor) ---- */
.pf-code-input { text-align: center; font-size: 1.5rem; letter-spacing: 0.4rem; font-family: ui-monospace, monospace; }
.pf-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0.5rem; }
.pf-avatar { position: relative; display: flex; justify-content: center; padding: 4px; border-radius: 9999px; cursor: pointer; }
.pf-avatar input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-avatar img { width: 60px; height: 60px; border-radius: 9999px; border: 3px solid transparent; transition: transform 0.1s; }
.pf-avatar:hover img { border-color: var(--pf-edge); transform: translateY(-1px); }
.pf-avatar input:checked + img { border-color: var(--pf-gold); box-shadow: 0 0 0 3px rgb(232 196 134 / 0.25); }
.pf-avatar input:focus-visible + img { outline: 3px solid var(--pf-ice); outline-offset: 2px; }
.pf-avatar-btn { border-radius: 9999px; padding: 2px; border: 3px solid transparent; line-height: 0; }
.pf-avatar-btn:hover { border-color: var(--pf-edge); }
.pf-avatar-btn.is-selected { border-color: var(--pf-gold); box-shadow: 0 0 0 3px rgb(232 196 134 / 0.25); }
.pf-join-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem;
    margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: 0.875rem; background: var(--pf-panel);
    border: 1px solid var(--pf-edge); border-left: 4px solid var(--pf-bronze); }
.pf-join-cta strong { color: var(--pf-gold); }
.pf-board-optin { padding: 0.875rem 1rem; border-radius: 0.75rem; background: var(--pf-panel2); border: 1px solid var(--pf-edge); }
.pf-board-preview { display: flex; align-items: center; gap: 0.625rem; margin-top: 0.75rem; padding: 0.5rem 0.75rem;
    border-radius: 0.5rem; background: var(--pf-void); border: 1px dashed #3a3742; font-size: 0.9375rem; }
.pf-board-preview img { width: 28px; height: 28px; border-radius: 9999px; }
.pf-board-preview .pf-rank { width: 2rem; color: var(--pf-faint); }
.pf-board-preview .pf-name { flex: 1; color: var(--pf-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-board-preview .pf-score { font-family: ui-monospace, monospace; color: var(--pf-dim); }

/* Tables scroll sideways inside their card on small screens (the card clipped the last columns,
   including the admin Approve / Remove actions). */
@media (max-width: 1023px) {
    .overflow-hidden:has(> table), .card:has(> table), .card-body:has(> table) { overflow-x: auto; }
    .overflow-hidden > table, .card > table, .card-body > table { min-width: 720px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
