/* ============================================================
   CHOIR MANAGEMENT SYSTEM — Premium Auth Page Styles
   Glassmorphism Full-Screen Layout with Floating Labels
   ============================================================ */

/* Auth Wrapper — Full viewport */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../choir_images/DSC02709.jpg.jpeg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    padding: 20px;
}

/* Dark overlay for better readability */
.auth-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75); /* dark slate overlay */
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1;
}

/* Hide the old split layout left side entirely */
.auth-left {
    display: none !important; 
}

/* Make auth-right transparent and center the card */
.auth-right {
    flex: none;
    width: 100%;
    max-width: 450px;
    z-index: 2;
    background: transparent !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* For Register page to be wider */
.auth-wrapper.register-page .auth-right {
    max-width: 750px;
}

/* Glassmorphism Card */
.auth-form-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 45px 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    color: white;
}

.auth-form-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-form-header h2 {
    font-family: var(--font-heading, sans-serif);
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.auth-form-header .subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Floating Label Inputs */
.form-floating {
    position: relative;
    margin-bottom: 20px;
}

.form-floating .form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 22px 16px 8px 48px !important; /* Room for icon on left */
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
    outline: none;
}

.form-floating .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

/* Fix input autofill background color */
.form-floating .form-control:-webkit-autofill,
.form-floating .form-control:-webkit-autofill:hover, 
.form-floating .form-control:-webkit-autofill:focus, 
.form-floating .form-control:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px rgba(255,255,255,0.1) inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

.form-floating label {
    position: absolute;
    left: 48px !important; /* align with text after icon */
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    font-size: 1rem;
}

/* Float the label on focus or when input is not placeholder-shown */
.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    top: 14px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Float label for WebKit autofill */
.form-floating .form-control:-webkit-autofill ~ label {
    top: 14px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Float label for standard autofill (Firefox) */
.form-floating .form-control:autofill ~ label {
    top: 14px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Icons */
.form-floating .input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.form-floating .form-control:focus ~ .input-icon {
    color: #ffffff;
}

/* Select inputs with floating labels */
.form-floating select.form-control {
    padding-top: 24px;
    padding-bottom: 6px;
    appearance: none;
}
.form-floating select.form-control option {
    background: #1e293b; /* slate-800 fallback for dropdown list */
    color: #f8fafc;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.3s;
    font-size: 1rem;
}

.password-toggle:hover {
    color: white;
}

/* Register Form Grid */
.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

@media (max-width: 768px) {
    .auth-grid {
        grid-template-columns: 1fr;
    }
    .auth-form-container {
        padding: 30px 20px;
        margin: 15px auto;
        width: calc(100% - 30px);
    }
    .auth-form-header h2 {
        font-size: 1.8rem;
    }
    .auth-form-header {
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .auth-form-container {
        padding: 25px 15px;
        margin: 10px auto;
        width: calc(100% - 20px);
    }
    .form-floating .form-control {
        padding: 20px 14px 6px 42px !important;
        font-size: 0.95rem;
    }
    .form-floating label {
        left: 42px !important;
        font-size: 0.95rem;
    }
    .form-floating .input-icon {
        left: 14px !important;
    }
}

/* Section dividers in register */
.form-section-title {
    grid-column: 1 / -1;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin: 15px 0 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

/* Options (Remember me, Forgot Password) */
.auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.auth-form-options .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-form-options .form-check-input {
    width: 16px;
    height: 16px;
    accent-color: #6366f1; /* indigo-500 */
}

.auth-form-options .form-check-label {
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    margin: 0;
}

.auth-form-options .forgot-link {
    color: #a5b4fc; /* light indigo */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-form-options .forgot-link:hover {
    color: white;
}

/* Buttons */
.auth-form .btn-primary {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.5);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    margin-top: 10px;
}

.auth-form .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(79, 70, 229, 0.6);
    background: linear-gradient(135deg, #4338ca, #6d28d9);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

/* Auth Links (New user, etc) */
.auth-links {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.auth-links a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    margin-left: 5px;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: #a5b4fc;
}

/* Alerts */
.auth-form .alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.auth-form .alert-success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

/* Form animation on load */
.auth-form-container {
    animation: authFormIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authFormIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
