/**
 * Mobile Login Screen
 * Scoped under @media (max-width: 767.98px)
 * Desktop (>= 768px) is 100% UNTOUCHED and unchanged.
 */

/* ==========================================================================
   DESKTOP OVERRIDES: Hide mobile-only elements on desktop
   ========================================================================== */
@media (min-width: 768px) {
    .mobile-bg-stage {
        display: none !important;
    }

    .app-logo-wrap {
        display: block;
        width: 100%;
    }
}

/* ==========================================================================
   MOBILE BASE: NO CARDS, NO WRAPPER BOXES, CLEAN CENTERED STREAM
   Order: Logo -> SMS/Password/Webmail buttons -> Form -> Login button
   ========================================================================== */
@media (max-width: 767.98px) {
    /* Prevent rigid h-100 flex stretching */
    #mobile-login-root,
    #mobile-login-root .app-container,
    #mobile-login-root .row,
    #mobile-login-root .col-md-6 {
        height: auto !important;
        min-height: 100dvh;
    }

    /* Screen container centers the stream naturally */
    #mobile-login-root .app-login-panel {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100dvh !important;
        padding: 2.5rem 1.25rem 3.5rem 1.25rem !important;
        position: relative !important;
        overflow-x: hidden !important;
        background: transparent !important;
    }

    /* NO CARD, NO WRAPPER BOX: Transparent, fluid, centered */
    #mobile-login-root .app-login-box {
        position: relative !important;
        z-index: 2 !important;
        width: 100% !important;
        max-width: 360px !important;
        height: auto !important;
        flex: none !important;
        margin: auto !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Hide redundant headings and divider on mobile */
    #mobile-login-root h4,
    #mobile-login-root h6,
    #mobile-login-root .divider {
        display: none !important;
    }

    /* Logo Wrapper & Logo (Clean floating white logo, no box/border) */
    #mobile-login-root .app-logo-wrap {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        margin: 0 auto 1.75rem auto !important;
        position: relative !important;
    }

    #mobile-login-root .app-logo {
        background-image: url('/images/allinclusive-logo-white.png') !important;
        background-color: transparent !important;
        background-position: center !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.75)) !important;
        width: 230px !important;
        height: 68px !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* Full-screen background stage (City Photo Background with Scrim) */
    .mobile-bg-stage {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 0 !important;
        pointer-events: none !important;
        overflow: hidden !important;
    }

    .mobile-bg-stage .mobile-bg-art {
        position: absolute !important;
        inset: 0 !important;
        background-image: url('/images/login-background.jpg') !important;
        background-size: cover !important;
        background-position: 65% center !important;
        transform: scale(1.08);
        filter: brightness(0.68) contrast(1.15);
    }

    .mobile-bg-stage .mobile-bg-art::after {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at center, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.8) 100%);
    }

    /* Form typography and labels over City Photo */
    #mobile-login-root .form-label {
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    }

    #mobile-login-root .form-check-label {
        color: #ffffff !important;
        font-weight: 500 !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    }

    /* Mode nav links (SMS, Heslo, Webmail): ALWAYS pure white, with white underline for the active one */
    #mobile-login-root .login-mode-link {
        color: #ffffff !important;
        opacity: 0.85;
        border-bottom: 2px solid transparent !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
        transition: opacity 0.15s ease, border-color 0.15s ease;
    }

    #mobile-login-root .login-mode-link i {
        color: #ffffff !important;
    }

    #mobile-login-root .login-mode-link:hover {
        color: #ffffff !important;
        opacity: 1;
    }

    #mobile-login-root .login-mode-link.active {
        color: #ffffff !important;
        opacity: 1;
        font-weight: 700 !important;
        border-bottom-color: #ffffff !important;
    }

    #mobile-login-root .login-mode-sep {
        color: rgba(255, 255, 255, 0.7) !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    }

    /* Submit button (Odoslať kód / Prihlásenie): Warm amber gold matching the logo's large 'A' */
    #mobile-login-root #login-form button[type="submit"],
    #mobile-login-root .btn-primary {
        background-color: #ff8d00 !important;
        border-color: #e67e00 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
        box-shadow: 0 4px 14px rgba(255, 141, 0, 0.38) !important;
        transition: all 0.2s ease !important;
    }

    #mobile-login-root #login-form button[type="submit"]:hover,
    #mobile-login-root .btn-primary:hover {
        background-color: #e67e00 !important;
        border-color: #cc7000 !important;
        color: #ffffff !important;
        box-shadow: 0 6px 18px rgba(255, 141, 0, 0.5) !important;
    }

    #mobile-login-root #login-form button[type="submit"]:active,
    #mobile-login-root .btn-primary:active {
        background-color: #cc7000 !important;
        border-color: #b36200 !important;
        transform: translateY(1px);
    }

    #mobile-login-root #login-form button[type="submit"]:focus,
    #mobile-login-root .btn-primary:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 141, 0, 0.45) !important;
    }

    /* Input focus ring with subtle matching gold highlight */
    #mobile-login-root .form-control:focus {
        border-color: #ff8d00 !important;
        box-shadow: 0 0 0 0.2rem rgba(255, 141, 0, 0.25) !important;
    }

    #mobile-login-root .forgot-password-link a {
        color: rgba(255, 255, 255, 0.9) !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
    }

    #mobile-login-root .webmail-link {
        color: rgba(255, 255, 255, 0.85) !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
    }
}
