/* VoltsBid Back Office — brand layer over MudBlazor.
   Tokens from VoltsBid_UI packages/ui/styles/theme.css (converted from OKLCH). */

:root {
    --bo-primary: #00488A;
    --bo-ink: rgba(0, 6, 38, 0.90);
    --bo-ink-muted: rgba(0, 9, 51, 0.60);
    --bo-border: #E3E5E7;
    --bo-canvas: #FAFAFA;
    --bo-radius: 8px;
    /* Geist is the brand font; system fallbacks when it isn't installed. */
    --mud-typography-default-family: Geist, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

html, body {
    font-family: Geist, ui-sans-serif, system-ui, -apple-system, sans-serif;
    background-color: var(--bo-canvas);
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #007D4D;
}

.invalid {
    outline: 1px solid #E7000B;
}

.validation-message {
    color: #E7000B;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Anonymous (static SSR) auth pages */
.bo-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bo-canvas);
    padding: 1rem;
}

.bo-auth-card {
    width: 100%;
    max-width: 420px;
}

.bo-field {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.bo-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--bo-ink);
    margin-bottom: 0.3rem;
}

.bo-field input[type=text],
.bo-field input[type=email],
.bo-field input[type=password] {
    border: 1px solid var(--bo-border);
    border-radius: var(--bo-radius);
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    color: var(--bo-ink);
    background: #fff;
}

.bo-field input:focus {
    outline: 2px solid var(--bo-primary);
    outline-offset: -1px;
    border-color: var(--bo-primary);
}

.bo-field-inline {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.bo-field-inline label {
    margin-bottom: 0;
    font-weight: 400;
    color: var(--bo-ink-muted);
}

.bo-submit {
    width: 100%;
    background-color: var(--bo-primary);
    color: #fff;
    border: none;
    border-radius: var(--bo-radius);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.bo-submit:hover {
    background-color: #003A70;
}

/* Logout button inside the account menu — looks like a menu item, posts a form. */
.bo-logout-button {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--bo-ink);
    cursor: pointer;
    text-align: left;
}

.bo-logout-button:hover {
    background-color: rgba(0, 72, 138, 0.06);
}

#blazor-error-ui {
    color-scheme: light only;
    background: #CC8D00;
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Blazor Server reconnection overlay (Components/Layout/ReconnectModal.razor).
   blazor.web.js toggles components-reconnect-* state classes on the modal at runtime.
   Hidden by default — without these rules the modal markup ("…to continue.") renders
   as visible text on every page. Shown only while reconnecting or after failure. */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 6, 38, 0.45);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-failed {
    display: flex;
}

.bo-reconnect-card {
    background: #fff;
    padding: 1.5rem 2rem;
    border-radius: var(--bo-radius);
    box-shadow: 0 12px 40px rgba(0, 6, 38, 0.25);
    text-align: center;
    max-width: 90vw;
}

.bo-reconnect-card p {
    margin: 0;
    color: var(--bo-ink);
}

/* One message per connection state. */
.bo-reconnect-rejoining,
.bo-reconnect-failed {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .bo-reconnect-rejoining,
#components-reconnect-modal.components-reconnect-retrying .bo-reconnect-rejoining {
    display: block;
}

#components-reconnect-modal.components-reconnect-failed .bo-reconnect-failed {
    display: block;
}
