﻿:root {
    --sat: env(safe-area-inset-top);
    --sar: env(safe-area-inset-right);
    --sab: env(safe-area-inset-bottom);
    --sal: env(safe-area-inset-left);
}

/* HTML styles for the Oktavis loading splash screen */

.center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.oktavis-logo {
    height: 160px;
    width: 160px;
    object-fit: contain;
    animation: logo-pulse 1.8s ease-in-out infinite;
}

.loading-text {
    margin-top: 24px;
    color: #FFFFFF;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.loading-bar {
    margin-top: 18px;
    width: 180px;
    height: 3px;
    border-radius: 3px;
    background: rgba(140, 160, 176, 0.25);
    overflow: hidden;
}

.loading-bar span {
    display: block;
    height: 100%;
    width: 40%;
    border-radius: 3px;
    background: #3190E0;
    animation: loading-slide 1.2s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.72; transform: scale(0.97); }
}

@keyframes loading-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

#avalonia-splash {
    position: relative;
    height: 100%;
    width: 100%;
    color: #FFFFFF;
    background: #0A1520;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    justify-content: center;
    align-items: center;
}

.splash-close {
    animation: fadeout 0.25s linear forwards;
}

/* ── PBI 196: native HTML login overlay ─────────────────────────────────────
   Colours mirror the app's Mod* palette (see Oktavis.Avalonia/MainApp/App.axaml):
   ModBg #0A1520, ModSurface #111E2C, ModPrimary #3190E0, ModText #FFF,
   ModMuted #8CA0B0, ModBorder #1E3048. Keep this consistent with the desktop
   login card (Desktop.axaml) so web and desktop look the same. */
#ok-login-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;                 /* above the Avalonia canvas */
    display: flex;                 /* toggled to 'none' when hidden (inline style) */
    justify-content: center;
    align-items: center;
    background: #0A1520;
    font-family: 'Inter', 'Nunito', system-ui, sans-serif;
}

.ok-login-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-width: 340px;
    max-width: 90vw;
    padding: 36px 40px;
    background: #111E2C;
    border: 1px solid #1E3048;
    border-radius: 8px;
}

.ok-login-title {
    text-align: center;
    color: #FFFFFF;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ok-login-label {
    color: #8CA0B0;
    font-size: 13px;
    margin: 12px 0 5px;
}

#ok-login-overlay input {
    box-sizing: border-box;
    height: 44px;
    width: 100%;
    padding: 0 16px;
    background: #0C1A28;
    border: 1px solid #1E3048;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 14px;
    outline: none;
}

#ok-login-overlay input::placeholder { color: #5A7A90; }
#ok-login-overlay input:focus { border-color: #3190E0; }

.ok-pw-row { position: relative; display: flex; align-items: center; }
.ok-pw-row input { padding-right: 44px; }

.ok-login-reveal {
    position: absolute;
    right: 4px;
    height: 40px;
    width: 40px;
    background: transparent;
    border: none;
    color: #8CA0B0;
    font-size: 16px;
    cursor: pointer;
}

.ok-login-error {
    color: #FF7043;
    font-size: 13px;
    min-height: 18px;
    margin-top: 10px;
}

.ok-login-submit {
    height: 40px;
    margin-top: 16px;
    background: #3190E0;
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ok-login-submit:hover { background: #4EA8F0; }
.ok-login-submit:disabled { opacity: 0.6; cursor: default; }

@keyframes fadeout {
    0% {
        opacity: 100%;
    }

    100% {
        opacity: 0;
        visibility: collapse;
    }
}
