/* App-level styles. Component styling belongs to MudBlazor + the theme tokens
   (Theme/FertToolsTheme.cs) — this file carries only the pre-Blazor splash screen
   and the global error bar. See docs/DESIGN-SYSTEM.md. */

html, body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #FAFAF7;
}

/* ---- Branded loading splash (visible until the WASM runtime replaces #app) ---- */

.ft-splash {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #F4F6F6;
    color: #212121;
}

.ft-splash-mark {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0A2A48, #309DFD);
}

.ft-splash-title {
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ft-splash-progress {
    width: 180px;
    height: 4px;
    border-radius: 2px;
    background: #E0E0DA;
    overflow: hidden;
}

.ft-splash-bar {
    width: 40%;
    height: 100%;
    border-radius: 2px;
    background: #309DFD;
    animation: ft-splash-slide 1.2s ease-in-out infinite;
}

@keyframes ft-splash-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(450%); }
}

.ft-splash-text {
    font-size: 0.9rem;
    color: #5F6368;
}

@media (prefers-reduced-motion: reduce) {
    .ft-splash-bar { animation: none; }
}

/* ---- Unhandled-error bar ---- */

#blazor-error-ui {
    background: #C62828;
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.25);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .reload {
    color: #fff;
    font-weight: 600;
    margin-left: 0.75rem;
}

#blazor-error-ui .dismiss {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font: inherit;
    padding: 0.25rem;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

#blazor-error-ui .dismiss:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---- Branded top app bar (V2 "Balance" theme — see docs/DESIGN-SYSTEM.md) ----
   Horizontal blue→navy gradient (light left, dark right). MudAppBar's background
   is a single theme token, so the gradient is applied here.
   The left nav drawer stays the default light surface with default grey nav text. */
.ft-appbar.mud-appbar {
    background: linear-gradient(90deg, #309DFD 0%, #0A2A48 70%);
}

/* ---- Farm selector (BookSwitcher) on the dark (right) end of the app bar ----
   Lighten the in-bar outlined MudSelect so it stays legible; the open dropdown
   panel keeps its normal light surface (it renders over page content). */

/* The selected-value text renders in the input/root element; force it (and the
   label) to the same white the Sign out action uses. !important overrides
   MudBlazor's default text-primary colour on the input. */
.book-switcher,
.book-switcher .mud-input-root,
.book-switcher .mud-input-slot,
.book-switcher input.mud-input-slot,
.book-switcher .mud-select-input,
.book-switcher .mud-input-label {
    color: #FFFFFF !important;
}

.book-switcher .mud-input-adornment .mud-icon-root,
.book-switcher .mud-select .mud-icon-root {
    color: rgba(255, 255, 255, 0.85) !important;
}

.book-switcher .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.5);
}

.book-switcher .mud-input-control:hover .mud-input-outlined-border {
    border-color: rgba(255, 255, 255, 0.8);
}
