/*
 * After Hours Roleplay theme for txAdmin v8 (panel).
 * Applies to the "afterhours" theme (the default). Dark / Light in the theme picker still work as before.
 */

@font-face {
    font-family: "AH Oswald";
    src: url("./oswald.v800.woff") format("woff");
    font-weight: 200 700;
    font-display: swap;
}

/* Colours ----------------------------------------------------------------------------------------- */
.theme-afterhours {
    --background: 216.9 56.5% 9%;
    --foreground: 42 25% 92.2%;
    --card: 216.4 52.4% 12.4%;
    --card-foreground: 42 25% 92.2%;
    --popover: 216.8 56.4% 10.8%;
    --popover-foreground: 42 25% 92.2%;
    --primary: 40.2 55.4% 65.7%;
    --primary-foreground: 216.9 56.5% 9%;
    --secondary: 216.5 46% 19.6%;
    --secondary-foreground: 42 25% 92.2%;
    --muted: 216.9 50.6% 15.1%;
    --muted-foreground: 216 18.8% 68.6%;
    --accent: 39.6 50.2% 57.5%;
    --accent-foreground: 216.9 56.5% 9%;
    --border: 217.9 46.3% 24.1%;
    --input: 217.4 45.2% 26.5%;
    --ring: 40.2 55.4% 65.7%;
    --destructive: 357.7 72.6% 58.4%;
    --destructive-foreground: 0 0% 100%;
    --destructive-hint: 353.7 48.7% 15.3%;
    --destructive-inline: 358 100% 71%;

    --ah-gold: linear-gradient(100deg, #E6CB8C, #D8B877 40%, #C9A45C 75%, #A8833F);
    --ah-gold-solid: #D8B877;
    --ah-navy-0: #050B14;
    --ah-navy-2: #101E33;

}

.theme-afterhours body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(216, 184, 119, 0.10), transparent 60%),
        radial-gradient(ellipse 60% 60% at 100% 100%, rgba(24, 42, 68, 0.6), transparent 70%),
        hsl(var(--background));
    background-attachment: fixed;
}

.theme-afterhours ::selection { background: rgba(216, 184, 119, 0.35); color: #fff; }

/* Logo: txAdmin's logo swapped for the After Hours one ------------------------------------------ */
.theme-afterhours svg[viewBox="0 0 1115 288"] {
    background: url("./ahrp-logo.v800.png") no-repeat left center / contain;
    aspect-ratio: 1115 / 288;
    height: auto;
}
.theme-afterhours svg[viewBox="0 0 1115 288"].h-9 { height: 2.4rem; width: auto; }
.theme-afterhours svg[viewBox="0 0 1115 288"] > * { display: none; }
.theme-afterhours svg[viewBox="0 0 1115 288"].mx-auto { background-position: center; width: 22rem; max-width: 90vw; }

/* Type ---------------------------------------------------------------------------------------------- */
.theme-afterhours h1,
.theme-afterhours h2,
.theme-afterhours h3,
.theme-afterhours [class*="CardTitle"],
.theme-afterhours .text-2xl,
.theme-afterhours .text-3xl {
    font-family: "AH Oswald", var(--font-sans), sans-serif;
    letter-spacing: 0.02em;
}

/* Top navigation: Oswald, uppercase, gold underline on the active / hovered link */
.theme-afterhours header,
.theme-afterhours nav.sticky,
.theme-afterhours .sticky.top-0 {
    background: rgba(8, 16, 30, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(216, 184, 119, 0.22);
}
.theme-afterhours header a,
.theme-afterhours header button,
.theme-afterhours nav a {
    font-family: "AH Oswald", var(--font-sans), sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.theme-afterhours header a:hover,
.theme-afterhours header a[aria-current="page"],
.theme-afterhours header a[data-active="true"] {
    color: var(--ah-gold-solid);
}

/* Cards ---------------------------------------------------------------------------------------------- */
.theme-afterhours .rounded-xl.border,
.theme-afterhours .rounded-lg.border.bg-card,
.theme-afterhours .bg-card.border {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
        hsl(var(--card));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Buttons: primary = gold gradient */
.theme-afterhours .bg-primary {
    background: var(--ah-gold);
    color: hsl(var(--primary-foreground));
    font-weight: 600;
}
.theme-afterhours .bg-primary:hover { filter: brightness(1.08); }
.theme-afterhours .border-accent { border-color: hsl(var(--accent)) !important; }
.theme-afterhours .bg-accent { background: var(--ah-gold); color: hsl(var(--accent-foreground)); }

/* Inputs */
.theme-afterhours input,
.theme-afterhours textarea,
.theme-afterhours select {
    background-color: rgba(5, 11, 20, 0.55);
}
.theme-afterhours input:focus-visible,
.theme-afterhours textarea:focus-visible {
    border-color: hsl(var(--ring));
}

/* Avatar initials, badges */
.theme-afterhours .bg-success { color: hsl(var(--success-foreground)); }

/* Scrollbars */
.theme-afterhours ::-webkit-scrollbar { width: 10px; height: 10px; }
.theme-afterhours ::-webkit-scrollbar-track { background: transparent; }
.theme-afterhours ::-webkit-scrollbar-thumb { background: #21365A; border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
.theme-afterhours ::-webkit-scrollbar-thumb:hover { background: #8A7442; background-clip: padding-box; border: 2px solid transparent; }

/* Login page ----------------------------------------------------------------------------------------- */
.theme-afterhours .min-h-80.bg-card\/40 {
    background:
        linear-gradient(180deg, rgba(216, 184, 119, 0.06), transparent 35%),
        rgba(15, 28, 48, 0.85);
    border-top: 2px solid var(--ah-gold-solid);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.theme-afterhours .min-h-80 form button:not(.cfxrebtn) {
    background: var(--ah-gold);
    color: hsl(var(--primary-foreground));
    border-color: transparent;
    font-weight: 600;
}
.theme-afterhours .min-h-80 form button:not(.cfxrebtn):hover { filter: brightness(1.08); }

/* "Login with Cfx.re": was pink */
.theme-afterhours .cfxrebtn {
    border: 1px solid rgba(216, 184, 119, 0.7);
    background: rgba(216, 184, 119, 0.08);
    box-shadow: 0 0 10px rgba(216, 184, 119, 0.18);
    color: #E6CB8C;
}
.theme-afterhours .cfxrebtn:hover { background: rgba(216, 184, 119, 0.22); color: #fff; }

/* Header status buttons (Server / Menu / Players) and the avatar */
.theme-afterhours .dark\:bg-zinc-900 { background-color: rgba(5, 11, 20, 0.55); }
.theme-afterhours .dark\:hover\:bg-zinc-800:hover { background-color: #182A44; }
.theme-afterhours .dark\:border-zinc-800 { border-color: rgba(216, 184, 119, 0.22); }
.theme-afterhours header button span[style*="background-color"] {
    background: var(--ah-gold) !important;
    color: #0A1424;
    font-family: "AH Oswald", var(--font-sans), sans-serif;
}

/* txAdmin's own Discord button and hosting-sponsor adverts (not part of the server's look) */
.theme-afterhours a[href*="discord.gg/uAmsGa2"],
.theme-afterhours a[href*="utm_medium=advert"] {
    display: none !important;
}

/* Live console / terminals: the terminal itself is coloured in JS; this is its frame */
.theme-afterhours .xterm,
.theme-afterhours .xterm-viewport { background-color: #081120 !important; }
