/* improved-forms-dark.css - transform to Static Labels */

/* SECURITY & NAV HIDING */

/* Hide "Register as a new user" link on Login Page */
a[href*="Register"],
a[href*="register"] {
    display: none !important;
}

/* Hide "Email" tab in Account Management Sidebar */
/* This prevents users from navigating to the Email change page */
.nav-pills .nav-link[href*="Email"],
.nav-pills .nav-link#email {
    display: none !important;
}

/* Hide "Email" form section if somehow accessed */
form#email-form {
    display: none !important;
}

/* Base Input Style */
.form-control, .form-select {
    background-color: #1e293b !important; /* Solid Slate-800 */
    border: 1px solid #475569 !important; /* Slate-600 */
    color: #f1f5f9 !important; /* Slate-100 */
    border-radius: 8px; /* Slightly softer corners */
    min-height: 48px;
}

/* Focus State */
.form-control:focus, .form-select:focus {
    background-color: #0f172a !important; 
    border-color: #F59E0B !important; 
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
}

/* TRANSFORMATION: Convert Floating Labels to Static Top Labels */
/* This matches your preferred "NOTES/DETAIL" style */

.form-floating {
    display: flex;
    flex-direction: column-reverse; /* Moves the label (which is 2nd in DOM) to the top */
    margin-bottom: 1.5rem !important; /* More space for the label */
}

/* DESTROY THE WHITE BAR (Bootstrap's border gap hack) - NUCLEAR OPTION */
.form-floating::after,
.form-floating::before,
.form-floating > label::after,
.form-floating > label::before,
.form-floating > .form-control:focus ~ label::after,
.form-floating > .form-control:focus ~ label::before,
.form-floating > .form-control:not(:placeholder-shown) ~ label::after,
.form-floating > .form-control:not(:placeholder-shown) ~ label::before {
    display: none !important;
    content: none !important;
    background-color: transparent !important;
    opacity: 0 !important;
    width: 0 !important;
    border: none !important;
}

.form-floating > .form-control, 
.form-floating > .form-select {
    height: auto !important;
    padding: 12px 16px !important; /* Normal padding, no extra space for label */
    line-height: 1.5;
}

.form-floating > label {
    position: static !important; /* No longer absolute positioning */
    width: 100%;
    height: auto !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
    
    /* Typography matching your screenshot */
    text-transform: uppercase;
    font-size: 0.75rem !important; /* Small text */
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #94a3b8 !important; /* Slate-400 (Faded) */
    opacity: 1 !important;
    transform: none !important; /* Remove scaling/moving animation */
    background-color: transparent !important;
    border: none !important;
}

/* Hide Placeholder until focused (optional, keeps it clean) */
.form-floating > .form-control::placeholder {
    color: #475569 !important;
    opacity: 1;
}

/* Autofill Fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: #f1f5f9 !important;
    caret-color: #f1f5f9 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Disabled State */
.form-control:disabled {
    background-color: #334155 !important;
    opacity: 0.7;
}

/* INPUT GROUP FIXES */
.input-group > .form-floating {
    height: auto;
}

/* VALIDATION STATE FIXES (The "Green Checkmark" White Box Issue) */
.form-control.is-valid, 
.was-validated .form-control:valid,
.form-control.is-invalid, 
.was-validated .form-control:invalid {
    background-color: #1e293b !important; /* Force Dark Background */
    border-color: #475569 !important;
    color: #f1f5f9 !important;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem) !important;
}

.form-control.is-valid:focus, 
.was-validated .form-control:valid:focus {
    background-color: #0f172a !important;
    border-color: #10b981 !important; /* Emerald-500 */
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.form-control.is-invalid:focus, 
.was-validated .form-control:invalid:focus {
    background-color: #0f172a !important;
    border-color: #ef4444 !important; /* Red-500 */
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

/* Disabled + Valid state (e.g. Current Email field) */
.form-control.is-valid:disabled,
.was-validated .form-control:valid:disabled {
    background-color: #334155 !important;
    opacity: 0.8;
}
