/* Login page styles for WAHID */

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    background-color: #121212; /* Fallback color */
    background-image: url('/static/img/backgrounds/bali_terraced_rice_fields_in_tegallalang_20250315190258-fs9-fs8.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Dark overlay for better readability */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.auth-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10; /* Above the overlay */
}

.auth-logo {
    text-align: center;
    margin-bottom: 15px;
}

.auth-logo img {
    height: 45px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.auth-logo img:hover {
    transform: scale(1.05);
}

.auth-card {
    background-color: rgba(25, 25, 25, 0.75); /* Semi-transparent background */
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(80, 80, 80, 0.5);
    backdrop-filter: blur(2px); /* Very light blur effect */
    -webkit-backdrop-filter: blur(2px); /* For Safari */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    transform: translateY(0);
    padding-top: 20px;
}

.auth-card:hover {
    background-color: rgba(30, 30, 30, 0.8);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-5px);
}

.auth-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.auth-tabs .nav-item {
    width: 50%;
    text-align: center;
}

.auth-tabs .nav-link {
    color: #f8f9fa;
    border: none;
    padding: 15px 0;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.1rem;
    width: 100%;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tabs .nav-link.active {
    background-color: transparent;
    color: #086375;
    font-weight: 600;
    border-bottom: 2px solid #086375;
}

.auth-form {
    padding: 25px;
}

.form-control {
    background-color: rgba(45, 45, 45, 0.6);
    border: 1px solid rgba(80, 80, 80, 0.5);
    color: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

/* Ensure consistent styling for all form controls */
#register-panel .form-control,
#login-panel .form-control,
.auth-card .form-control {
    background-color: rgba(45, 45, 45, 0.6) !important;
    border: 1px solid rgba(80, 80, 80, 0.5) !important;
    color: #f8f9fa !important;
}

.form-control:focus {
    background-color: rgba(50, 50, 50, 0.7);
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(8, 99, 117, 0.25);
    border-color: rgba(8, 99, 117, 0.5);
}

/* Ensure consistent focus styling */
#register-panel .form-control:focus,
#login-panel .form-control:focus,
.auth-card .form-control:focus {
    background-color: rgba(50, 50, 50, 0.7) !important;
    color: #ffffff !important;
}

.form-label {
    color: #d0d0d0;
    font-weight: 500;
    margin-bottom: 8px;
}

.btn-primary {
    background-color: #086375;
    border-color: #086375;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #065362;
    border-color: #065362;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


/* Title with shadow */
.app-title {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    font-size: 2rem;
    letter-spacing: 1px;
    display: inline-block;
}

/* Removed: Refresh background button and Background attribution styles */

/* Loading indicator with spinner logo */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: 9998;
    pointer-events: none;
    transition: none !important; /* Prevent transitions */
}

.spinlogoLoader {
    display: none; /* Hide by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 0.8;
    pointer-events: none;
    width: 64px;
    height: 64px;
    animation-name: spinlogo;
    animation-duration: 600ms;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    transition: none !important; /* Prevent transitions */
}

.spinlogoLoader img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes spinlogo {
    from { transform: translate(-50%, -50%) rotate(360deg); }
    to { transform: translate(-50%, -50%) rotate(0deg); }
}

/* Enhanced input fields with icons */
.input-group-text {
    color: #adb5bd;
}

.input-group:focus-within .input-group-text {
    color: #086375;
}

/* Fix input group styling in auth forms */
.auth-card .input-group .input-group-text {
    background-color: rgba(45, 45, 45, 0.6) !important;
    border: 1px solid rgba(80, 80, 80, 0.5) !important;
    border-right: none !important;
}

.auth-card .input-group .form-control {
    background-color: rgba(45, 45, 45, 0.6) !important;
    border: 1px solid rgba(80, 80, 80, 0.5) !important;
    border-left: none !important;
}

/* Handle the transparent background class */
.auth-card .input-group-text.bg-transparent {
    background-color: rgba(45, 45, 45, 0.6) !important;
}

/* Focus states for input groups */
.auth-card .input-group:focus-within .input-group-text {
    background-color: rgba(50, 50, 50, 0.7) !important;
    border-color: rgba(8, 99, 117, 0.5) !important;
}

.auth-card .input-group:focus-within .form-control {
    background-color: rgba(50, 50, 50, 0.7) !important;
    border-color: rgba(8, 99, 117, 0.5) !important;
}

/* Handle autofill styling consistently */
.auth-card input:-webkit-autofill,
.auth-card input:-webkit-autofill:hover,
.auth-card input:-webkit-autofill:focus,
.auth-card input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(45, 45, 45, 0.9) inset !important;
    -webkit-text-fill-color: #f8f9fa !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Ensure all input fields have consistent styling */
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    background-color: rgba(45, 45, 45, 0.6) !important;
    color: #f8f9fa !important;
}

/* Override any default input styling from Bootstrap or browser */
#login-panel .form-control,
#register-panel .form-control {
    background-color: rgba(45, 45, 45, 0.6) !important;
    color: #f8f9fa !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Ensure placeholder text is visible */
.auth-card .form-control::placeholder {
    color: rgba(248, 249, 250, 0.5);
    opacity: 1;
}

/* Icon spacing in buttons */
.btn i {
    margin-right: 8px;
}

/* Form validation styling */
.form-control.is-invalid {
    background-image: none;
}

.form-control.is-valid {
    background-image: none;
}

/* Fade transitions */
.tab-pane {
    transition: opacity 0.3s ease;
}

.tab-pane.show {
    opacity: 1;
}

.tab-pane:not(.show) {
    opacity: 0;
}

/* Forgot password link */
.forgot-password-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password-link:hover {
    color: #086375;
    text-decoration: underline;
}

/* Password requirements text - smaller font */
.password-requirements {
    font-size: 0.75rem;
    line-height: 1.2;
}