/* ================================================================
   Unison – Globalne style aplikacji
   Uzupełnienie MudBlazor, NIE zastępowanie.
   Nigdy nie hardkodujemy kolorów – używamy zmiennych CSS MudBlazor.
   ================================================================ */

/* Reset i typografia bazowa */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Outfit', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
    /* Blokada zbędnego skalowania na iOS */
    -webkit-text-size-adjust: 100%;
}

h1:focus {
    outline: none;
}

/* ================================================================
   Splash screen (widoczny podczas ładowania WASM)
   ================================================================ */
.unison-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    background: #F7F8FA;
    animation: fadeIn 0.4s ease-in;
}

.unison-splash__logo {
    animation: pulse 1.5s ease-in-out infinite;
}

.unison-splash__text {
    margin-top: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #27AE60;
    letter-spacing: 0.05em;
}

@keyframes pulse {
    0%, 100% { transform: scale(1);   opacity: 1;   }
    50%       { transform: scale(1.08); opacity: 0.85; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   Blazor Error UI
   ================================================================ */
#blazor-error-ui {
    color-scheme: light only;
    background: #FFF3CD;
    border-top: 2px solid #FFC107;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    color: #664D03;
}

#blazor-error-ui .reload {
    color: #27AE60;
    font-weight: 600;
    margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #664D03;
    font-size: 1rem;
}

/* ================================================================
   Akordy – typografia (używana przez ChordViewer)
   ================================================================ */
.chord-name {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--mud-palette-primary);
    line-height: 1;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
}

.chord-syllable {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre;
}

.chord-pair {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 2px;
    vertical-align: bottom;
}

/* Akordy harmonijkowe – inline */
.harmonica-inline {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--mud-palette-secondary);
    background: color-mix(in srgb, var(--mud-palette-secondary) 10%, transparent);
    padding: 1px 4px;
    border-radius: 4px;
    margin: 0 2px;
}

/* ================================================================
   Layout globalny – dolna nawigacja (mobile-first)
   Główna zawartość ma padding-bottom aby nie chować się pod nav.
   ================================================================ */
.unison-page-content {
    padding-bottom: 72px; /* wysokość bottom nav */
}

/* ================================================================
   Scrollbar styling (desktop)
   ================================================================ */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* ================================================================
   Mikro-animacje (globalne)
   ================================================================ */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.animate-slide-up {
    animation: slideUpFade 0.35s ease-out both;
}

/* Opóźnione wejście kart (stagger effect) */
.animate-slide-up:nth-child(1) { animation-delay: 0.05s; }
.animate-slide-up:nth-child(2) { animation-delay: 0.10s; }
.animate-slide-up:nth-child(3) { animation-delay: 0.15s; }
.animate-slide-up:nth-child(4) { animation-delay: 0.20s; }
.animate-slide-up:nth-child(5) { animation-delay: 0.25s; }