/* Page layout for rustplayers.com. Components and colours live in rp.css - only layout goes here. */

html, body { min-height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; padding-left: 90px; }
main { flex: 1; }

/* ------------------------------------------------------------------ sidebar
   A thin rail with icons only. On hover (or keyboard focus) it widens over the page and shows the labels. */
.site-sidebar {
    position: fixed; top: 12px; bottom: 12px; left: 12px; z-index: 30;
    display: flex; flex-direction: column; gap: 4px;
    width: 66px; padding: 12px;
    overflow: hidden;
    border: 1px solid var(--rp-line); border-radius: var(--rp-radius-lg);
    background: var(--rp-panel);
    transition: width var(--rp-ease), box-shadow var(--rp-ease);
}
.site-sidebar:hover, .site-sidebar:focus-within { width: 232px; box-shadow: 0 12px 40px #0009; }

.site-label { opacity: 0; white-space: nowrap; transition: opacity var(--rp-ease); }
.site-sidebar:hover .site-label, .site-sidebar:focus-within .site-label { opacity: 1; }

.site-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--rp-white); }
.site-brand:hover { color: var(--rp-white); }
.site-brand img { flex-shrink: 0; }
.site-brand-sub { display: block; font-size: 12px; color: var(--rp-ink-faint); }

.site-nav { display: flex; flex-direction: column; gap: 4px; }
.site-nav-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rp-line); }
.site-group-title { height: 24px; padding: 0 11px; line-height: 24px; }

.site-nav-link {
    display: flex; align-items: center; gap: 14px;
    height: 40px; padding: 0 11px;
    border-radius: var(--rp-radius);
    color: var(--rp-ink-muted); font-weight: 500;
    transition: background-color var(--rp-ease), color var(--rp-ease);
}
.site-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.site-nav-link:hover { background: var(--rp-raised); color: var(--rp-ink); }
.site-nav-link:focus-visible { outline: none; box-shadow: var(--rp-focus); }
.site-nav-link[aria-current="page"] { background: var(--rp-accent-soft); color: var(--rp-accent); }

/* "Sign in with Steam", or the signed-in user + Sign out (site_account) */
.site-account { display: flex; align-items: center; gap: 6px; margin: 0; }
.site-account-user { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--rp-ink); }
.site-account-user img, .site-account-noavatar { width: 28px; height: 28px; border-radius: var(--rp-radius-sm); box-shadow: 0 0 0 1px var(--rp-line-strong); }
.site-account-noavatar { display: grid; place-items: center; background: var(--rp-card); color: var(--rp-ink-muted); }
.site-account-noavatar svg { width: 16px; height: 16px; }
.site-account-out { padding: 6px 10px; font-size: 13px; }
.site-account-in { padding: 6px 14px; font-size: 13px; }
@media (max-width: 640px) {
    .site-account-out span { display: none; }
}

/* Phones: no hover on touch, so the rail turns into a bottom bar with small labels */
@media (max-width: 640px) {
    body { padding-left: 0; padding-bottom: 64px; }
    .site-sidebar, .site-sidebar:hover, .site-sidebar:focus-within {
        top: auto; right: 0; bottom: 0; left: 0;
        flex-direction: row; width: auto; height: 64px; padding: 8px;
        border-width: 1px 0 0; border-radius: 0; box-shadow: none;
    }
    .site-brand, .site-group-title { display: none; }
    .site-nav, .site-nav-bottom { flex-direction: row; flex: 2; margin: 0; padding: 0; border: 0; }
    .site-nav-link { flex: 1; flex-direction: column; justify-content: center; gap: 2px; height: 48px; padding: 0; font-size: 11px; }
    .site-nav-link .site-label { opacity: 1; }
}

/* ------------------------------------------------------------------ footer
   Copyright on the left, the Facepunch notice on the right; stacked on narrow screens. Same width as the pages. */
.site-footer-inner { max-width: 1340px; padding: 32px 24px 28px; }
/* Bottom row: copyright left, the Facepunch notice right - both start on the same line */
.site-footer-bottom { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 40px; font-size: 12px; line-height: 1.6; color: var(--rp-ink-faint); }
.site-footer-bottom p { margin: 0; }
.site-footer-extra { color: var(--rp-ink-faint); opacity: 0.8; }
.site-footer-legal { max-width: 640px; text-align: right; text-wrap: pretty; opacity: 0.8; }
.site-footer-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.site-footer-legal a:hover { color: var(--rp-ink); }
@media (max-width: 900px) { .site-footer-legal { max-width: none; text-align: left; } }

/* ------------------------------------------------------------------ pages */
.site-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }


/* Pages sit against the sidebar rail instead of centred - the widened menu may cover them, that's fine */
.rp-container { max-width: 1340px; margin-left: 0; padding-left: 24px; } /* one width for every page */
.site-page { width: 100%; padding-top: 24px; padding-bottom: 56px; }
.site-page-head { margin-bottom: 24px; }
.site-page-head p { margin: 6px 0 0; color: var(--rp-ink-muted); }

/* Page head with a button on the right (admin: Sign out) */
.site-page-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.site-gap { margin-bottom: 16px; }
.site-gap-top { margin-top: 16px; }
.site-full { width: 100%; }

/* Admin */
.site-login { max-width: 380px; margin: 40px auto 0; }
.site-login-or { margin: 16px 0 12px; text-align: center; font-size: 12px; color: var(--rp-ink-faint); }
.site-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.site-dl dt { color: var(--rp-ink-faint); }
.site-dl dd { margin: 0; color: var(--rp-ink); overflow-wrap: anywhere; }
.site-card-note { margin: 16px 0; font-size: 12px; color: var(--rp-ink-muted); }

/* Admin: the Pages list (name, address, status, switch) */
.site-pages { margin: 0; padding: 0; list-style: none; }
.site-pages li { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--rp-line); }
.site-pages li:first-child { border-top: 0; }
.site-pages-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--rp-radius); background: var(--rp-card); color: var(--rp-accent); }
.site-pages-icon svg { width: 16px; height: 16px; }
.site-pages-name { display: grid; flex: 1; min-width: 0; }
.site-pages-name a { color: var(--rp-white); font-weight: 600; }
.site-pages-name .rp-mono { font-size: 12px; }
.site-pages .rp-status { min-width: 92px; }
.site-pages form { display: flex; align-items: center; }

/* Admin: updates */
.site-updates { display: grid; gap: 16px; }
/* Installed v1.3.2 · On GitHub v1.3.3 [Update available] · 13 Oct 2026 - one line, wraps only on narrow screens */
.site-update-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0; }
.site-update-line > span:not(.site-warn) { white-space: nowrap; }
.site-update-notes ul { margin: 8px 0 0; padding-left: 20px; color: var(--rp-ink-muted); }
.site-update-notes li + li { margin-top: 4px; }
.site-backups { border: 1px solid var(--rp-line); border-radius: var(--rp-radius); }
.site-backups li { padding: 10px 16px; }
.site-updates .site-card-note { margin: 0; }

/* Admin layout: two columns - the big cards (map vote, updates) left, the smaller ones right; one column on narrow screens */
.site-admin-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.site-admin-col { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 1100px) { .site-admin-grid { grid-template-columns: minmax(0, 1fr); } }

/* Admin: map vote */
.site-mv { display: grid; gap: 16px; }
.site-mv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.site-mv-note { flex: 1; min-width: 200px; font-size: 13px; }
.site-mv .site-dl dd strong { color: var(--rp-white); }
.site-mv-help { margin: 6px 0 10px; }
.site-mv-schedule { align-items: flex-end; }
.site-mv-schedule label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--rp-ink-muted); }
.site-mv-schedule .rp-input { width: auto; }
.site-mv-schedule select.rp-input { max-width: 240px; }
/* Voting times: a switch between "every wipe" and "fixed dates" - only the chosen one's fields show */
.site-mv-times { display: grid; gap: 12px; margin-top: 8px; justify-items: start; }
.site-mv-times > div { width: 100%; }
.site-mv-mode label { position: relative; }
.site-mv-mode input { position: absolute; opacity: 0; pointer-events: none; }
.site-mv-mode span { display: block; padding: 6px 12px; border-radius: var(--rp-radius-sm); color: var(--rp-ink-muted); font-weight: 500; cursor: pointer; transition: var(--rp-ease); }
.site-mv-mode span:hover { color: var(--rp-ink); }
.site-mv-mode input:checked + span { background: var(--rp-accent); color: #fff; }
.site-mv-mode input:focus-visible + span { box-shadow: var(--rp-focus); }
.site-mv-times:has(input[name="mode"][value="auto"]:checked) .site-mv-fixed,
.site-mv-times:has(input[name="mode"][value="fixed"]:checked) .site-mv-auto { display: none; }
.site-mv-inline { display: flex; align-items: center; gap: 8px; color: var(--rp-ink); font-size: 13px; }
.site-mv-inline .rp-input { width: 72px; }
.site-mv-next { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; color: var(--rp-ink-muted); }
.site-mv-next svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--rp-accent); }
.site-mv-next strong { color: var(--rp-white); }

.site-mv-server { width: auto; max-width: 280px; padding: 4px 8px; font-size: 12px; text-transform: none; letter-spacing: 0; }

/* GitHub access (token) */
.site-token { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--rp-line); }
.site-token .rp-label { margin: 0; }
.site-token-row { display: flex; gap: 8px; }
.site-token-row .rp-input { flex: 1; min-width: 0; }
.site-token-clear { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--rp-ink-muted); }
.site-token .rp-help { margin: 0; }
.site-token .rp-help strong { color: var(--rp-ink); }
@media (max-width: 520px) { .site-token-row { flex-direction: column; } }

/* "What's new" window */
.site-whatsnew {
    width: min(640px, calc(100vw - 32px)); max-height: 85vh; padding: 0; overflow: hidden;
    border: 1px solid var(--rp-line); border-top: 3px solid var(--rp-accent); border-radius: 16px;
    background: var(--rp-panel); color: var(--rp-ink); box-shadow: 0 30px 80px #000000b3;
}
.site-whatsnew[open] { display: flex; flex-direction: column; }
.site-whatsnew::backdrop { background: #000000b3; backdrop-filter: blur(4px); }
.site-whatsnew-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 24px; border-bottom: 1px solid var(--rp-line); }
.site-whatsnew-head > svg { width: 20px; height: 20px; color: var(--rp-accent); }
.site-whatsnew-head h2 { flex: 1; font-size: 18px; }
.site-whatsnew-body { display: grid; gap: 20px; padding: 20px 24px 24px; overflow-y: auto; }
.site-whatsnew-body p { margin: 0; font-size: 13px; }
.site-whatsnew-version { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 12px; }
.site-whatsnew-version .rp-mono { font-size: 16px; font-weight: 600; color: var(--rp-white); }
.site-whatsnew ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; color: var(--rp-ink-muted); }
.site-whatsnew li + li { margin-top: 4px; }

/* Update popup (Install / Restore): confirm -> running -> done, in the What's new window's frame */
.site-update-popup [hidden] { display: none !important; }
.site-update-popup .site-whatsnew-body { gap: 16px; }
.site-update-popup .site-whatsnew-body > div { display: grid; gap: 14px; }
.site-update-icon { display: grid; color: var(--rp-accent); }
.site-update-icon svg { width: 20px; height: 20px; }
.site-update-ok { color: var(--rp-ok-text); }
.site-update-bad { color: var(--rp-danger-text); }
.site-update-spin svg { animation: site-spin 1s linear infinite; }
@keyframes site-spin { to { transform: rotate(360deg); } }
.site-update-popup .site-update-steps { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-family: var(--rp-font-mono, monospace); font-size: 13px; }
.site-update-popup .site-update-steps:empty { display: none; }
.site-update-steps li { margin: 0; padding-left: 22px; position: relative; }
.site-update-steps li::before { position: absolute; left: 0; }
.site-update-step-done { color: var(--rp-ink-muted); }
.site-update-step-done::before { content: '\2713'; color: var(--rp-ok-text); }
.site-update-step-failed { color: var(--rp-danger-text); }
.site-update-step-failed::before { content: '\2715'; }
.site-update-popup-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--rp-line); }

/* Sign-in trap field for bots: off-screen rather than display:none, which some bots skip */
.site-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Admin: develop mode form */
.site-dev-form { display: grid; gap: 16px; max-width: 720px; }
.site-dev-toggle { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.site-dev-toggle strong { display: block; color: var(--rp-white); }
.site-dev-toggle .rp-help { margin-top: 2px; }
.site-dev-form textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.site-dev-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Develop mode for visitors: the page dimmed and softly blurred behind a centred message card */
body.site-dev-locked { overflow: hidden; }
.site-dev {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center; padding: 24px; overflow-y: auto;
    background: #111317b3; backdrop-filter: blur(3px) saturate(0.6);
    animation: site-dev-in 240ms ease-out;
}
.site-dev-card {
    display: grid; justify-items: center; gap: 12px; width: 100%; max-width: 520px; padding: 36px 32px;
    text-align: center; box-shadow: 0 30px 80px #000000b3;
}
.site-dev-card img { border-radius: 12px; }
.site-dev-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font: 600 12px var(--rp-font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--rp-accent); }
.site-dev-eyebrow svg { width: 14px; height: 14px; }
.site-dev-card h2 { font-size: 24px; }
.site-dev-card p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; color: var(--rp-ink-muted); }
.site-dev-preview { margin-top: 8px; font-size: 12px; color: var(--rp-warn-text); text-decoration: underline; }
/* Small and quiet, so visitors aren't drawn to it - but admins are never locked out */
.site-dev-admin { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--rp-ink-faint); }
.site-dev-admin svg { width: 12px; height: 12px; }
.site-dev-admin:hover { color: var(--rp-ink-muted); }
@keyframes site-dev-in { from { opacity: 0; } }

/* "Under construction" page for visitors, and the note admins see on a page that's off */
.site-construction { display: grid; justify-items: start; gap: 12px; max-width: 520px; padding: 32px; }
.site-construction p { margin: 0; color: var(--rp-ink-muted); }
.site-construction-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--rp-radius-lg); background: #f59e0b1f; color: var(--rp-warn-text); }
.site-construction-icon svg { width: 24px; height: 24px; }
.site-notice { width: 100%; padding-top: 16px; }
.site-notice a { color: inherit; text-decoration: underline; }
.site-nav-tag { margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #f59e0b1f; color: var(--rp-warn-text); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
@media (max-width: 640px) {
    .site-nav-tag { display: none; }
    .site-pages li { flex-wrap: wrap; }
}

.site-warn-text { color: var(--rp-warn-text); }
