/* Geekd brand styles. Loaded after MudBlazor's CSS so the rules below
   override MudBlazor defaults where needed.

   Brand tokens:
     --geekd-header        : appbar / dark surfaces
     --geekd-header-text   : appbar text
     --geekd-bg            : page background
     --geekd-text          : default body text
     --geekd-brand         : main brand cyan
     --geekd-gradient      : explanation-box gradient
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --geekd-header: #222021;
    --geekd-header-text: #FFFFFF;
    --geekd-bg: #F5F5F5;
    --geekd-text: #000000;
    --geekd-brand: #00bbff;
    --geekd-gradient: linear-gradient(46deg,
        rgba(0, 0, 0, 1) 0%,
        rgba(53, 51, 205, 1) 100%);
}

html, body { height: 100%; margin: 0; }
body {
    font-family: 'Poppins', 'Roboto', Arial, sans-serif;
    background: var(--geekd-bg);
    color: var(--geekd-text);
}

/* Make MudBlazor pick up Poppins everywhere by overriding its font
   variables. v7 surfaces these as CSS variables on :root. */
:root {
    --mud-typography-default-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-h1-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-h2-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-h3-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-h4-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-h5-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-h6-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-subtitle1-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-subtitle2-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-body1-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-body2-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-button-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-caption-family: 'Poppins', 'Roboto', Arial, sans-serif;
    --mud-typography-overline-family: 'Poppins', 'Roboto', Arial, sans-serif;
}

/* -- Pill buttons ----------------------------------------------------
   White background, black text, fully rounded — matches the Geekd brief.
   Filled-Primary keeps the brand cyan as a solid call-to-action button so
   "save" / "create" actions still pop. */
.mud-button-root {
    border-radius: 9999px !important;
    text-transform: none !important;
    font-weight: 500;
    letter-spacing: 0;
}

.mud-button-filled.mud-button-filled-default,
.mud-button-outlined.mud-button-outlined-default,
.mud-button-text.mud-button-text-default {
    background-color: #FFFFFF !important;
    color: var(--geekd-text) !important;
    border: 1px solid #DDD;
}

.mud-button-filled.mud-button-filled-default:hover {
    background-color: #F0F0F0 !important;
}

/* Override Mud's default outlined-primary to keep the pill+white look but
   tint the border with the brand colour, so "secondary" actions read as
   on-brand without being loud. */
.mud-button-outlined.mud-button-outlined-primary {
    background-color: #FFFFFF !important;
    color: var(--geekd-text) !important;
    border-color: var(--geekd-brand) !important;
}

/* Brand-cyan filled buttons keep their colour but adopt the pill shape. */
.mud-button-filled.mud-button-filled-primary {
    background-color: var(--geekd-brand) !important;
    color: #FFFFFF !important;
}
.mud-button-filled.mud-button-filled-primary:hover {
    background-color: #009FE0 !important;
}

/* Icon buttons stay round — don't squish them with the pill rule above. */
.mud-icon-button {
    border-radius: 50% !important;
}

/* -- Explanation / hero boxes ---------------------------------------
   Apply <MudPaper Class="geekd-explain"> for the brand gradient panels.
   White text + slight inner padding for legibility. */
.geekd-explain {
    background: var(--geekd-gradient) !important;
    color: #FFFFFF !important;
    border-radius: 12px !important;
    border: none !important;
}
.geekd-explain .mud-typography,
.geekd-explain code,
.geekd-explain .mud-icon-root {
    color: #FFFFFF !important;
}

.geekd-preview-text {
    display: inline-block;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.geekd-preview-barcode {
    background: #FFFFFF;
    padding: 0.5rem;
    border-radius: 8px;
    display: inline-block;
}
.geekd-preview-barcode img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* -- Login page (Razor Page, no MudBlazor) -------------------------- */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: var(--geekd-gradient);
    font-family: 'Poppins', 'Roboto', Arial, sans-serif;
}
.login-card {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    width: 360px; max-width: 90%;
}
.login-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--geekd-text);
}
.login-card .muted { color: #666; font-size: 0.85rem; margin-bottom: 1rem; }
.login-card label {
    display: block; margin-top: 0.75rem;
    font-size: 0.85rem; color: #444;
}
.login-card input {
    width: 100%; padding: 0.6rem; margin-top: 0.25rem;
    border: 1px solid #CCC; border-radius: 8px; box-sizing: border-box;
    font-family: inherit;
}
.login-card input:focus {
    outline: none; border-color: var(--geekd-brand);
    box-shadow: 0 0 0 3px rgba(0, 187, 255, 0.18);
}
.login-card button {
    width: 100%; margin-top: 1.25rem; padding: 0.7rem 1rem;
    background: #FFFFFF; color: var(--geekd-text);
    border: 1px solid var(--geekd-text);
    border-radius: 9999px;
    font-weight: 600; font-family: inherit;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}
.login-card button:hover {
    background: var(--geekd-text); color: #FFFFFF;
}
.login-card .error {
    background: #FDECEA; color: #B71C1C;
    padding: 0.6rem; border-radius: 8px;
    margin-bottom: 0.75rem; font-size: 0.85rem;
}

#blazor-error-ui {
    background: var(--geekd-header); color: #FFFFFF;
    padding: 0.6rem; display: none;
    position: fixed; bottom: 0; left: 0; right: 0; text-align: center;
    font-family: 'Poppins', 'Roboto', Arial, sans-serif;
}
#blazor-error-ui.show { display: block; }
