/* ===========================================
   GetMetrix Auth Pages - Background Image Styles
   Login & Registration Pages
   =========================================== */

/* Background container - covers entire viewport */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 1rem;
    
    /* Background image settings */
    background-image: url('/images/auth-background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect on desktop */
}

/* Dark overlay for better text contrast */
.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

/* Content sits above overlay */
.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Card styling - glassmorphism effect */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

/* Login card - narrower */
.auth-card.login-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Register card - wider for form */
.auth-card.register-card {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
}

/* Card header */
.auth-card .card-header-custom {
    background: transparent;
    padding: 2rem 1.5rem 1rem;
    text-align: center;
    border-bottom: none;
}

/* Logo styling */
.auth-card .brand-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Subtle animation on load */
.auth-card {
    animation: slideUp 0.5s ease-out;
}

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

/* Footer link area */
.auth-footer {
    background: rgba(248, 249, 250, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ===========================================
   MOBILE RESPONSIVE (768px and below)
   =========================================== */
@media (max-width: 767.98px) {
    .auth-page {
        padding: 1rem 0.75rem;
        align-items: flex-start;
        padding-top: 2rem;
        /* Keep background fixed on mobile too */
    }
    
    /* Slightly darker overlay on mobile for better readability */
    .auth-page::before {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.5) 100%
        );
    }
    
    .auth-card {
        border-radius: 12px;
        margin: 0;
    }
    
    .auth-card.login-card,
    .auth-card.register-card {
        max-width: 100%;
    }
    
    .auth-card .card-header-custom {
        padding: 1.5rem 1rem 0.5rem;
    }
    
    .auth-card .brand-logo {
        max-width: 150px;
    }
    
    .auth-card .card-body {
        padding: 1rem;
    }
}

/* ===========================================
   SMALL MOBILE (576px and below)
   =========================================== */
@media (max-width: 575.98px) {
    .auth-page {
        padding: 0.5rem;
        padding-top: 1rem;
    }
    
    .auth-card .brand-logo {
        max-width: 130px;
    }
    
    .auth-card .card-header-custom h4,
    .auth-card .card-header-custom h5 {
        font-size: 1.1rem;
    }
    
    /* Stack form fields */
    .auth-card .row > [class*="col-md-"] {
        margin-bottom: 0;
    }
}

/* ===========================================
   LANDSCAPE MOBILE
   =========================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .auth-page {
        align-items: flex-start;
        padding: 0.5rem;
    }
    
    .auth-card .card-header-custom {
        padding: 1rem 1rem 0.5rem;
    }
    
    .auth-card .brand-logo {
        max-width: 120px;
        margin-bottom: 0.25rem;
    }
}

/* ===========================================
   HIGH-DPI / RETINA DISPLAYS
   =========================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .auth-page {
        /* Use higher resolution image for retina */
        background-image: url('/images/auth-background@2x.jpg');
    }
}

/* ===========================================
   REDUCED MOTION PREFERENCE
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }
}

/* ===========================================
   DARK MODE SUPPORT (via Bootstrap data-bs-theme)
   =========================================== */
[data-bs-theme="dark"] .auth-card {
    background: rgba(33, 37, 41, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .auth-card .form-control,
[data-bs-theme="dark"] .auth-card .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

[data-bs-theme="dark"] .auth-card .form-select option {
    background-color: #2b3035;
    color: #dee2e6;
}

[data-bs-theme="dark"] .auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-bs-theme="dark"] .auth-card .form-label {
    color: rgba(255, 255, 255, 0.8);
}

[data-bs-theme="dark"] .auth-footer {
    background: rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .auth-card .card-header-custom h4,
[data-bs-theme="dark"] .auth-card .card-header-custom h5,
[data-bs-theme="dark"] .auth-card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .auth-card .text-secondary {
    color: rgba(255, 255, 255, 0.6) !important;
}

[data-bs-theme="dark"] .auth-card .text-primary {
    color: #6ea8fe !important;
}
