/*
 * ═══════════════════════════════════════════════════════
 *  ICON ALLIANCE — FORM FIELD RESET
 *  forms.css  — load AFTER style.css
 *
 *  Overrides the floating-label pattern in style.css so
 *  labels sit above their fields (not inside them).
 *
 *  The specific offenders in style.css:
 *
 *  .form-group label {
 *      position: absolute;
 *      top: var(--space-lg);           <- sits inside the field
 *      background: rgba(30,41,59,.92); <- dark pill
 *  }
 *  .form-group input {
 *      padding: var(--space-lg) ...;   <- 1.5rem top padding for float
 *      border: 2px solid var(--glass-border);
 *  }
 * ═══════════════════════════════════════════════════════
 */


/* ─────────────────────────────────────
   1. LABEL — kill the float entirely
────────────────────────────────────── */

.form-group label {
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
    transition: none !important;
    pointer-events: auto !important;

    /* Kill the dark pill background */
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;

    /* Normal label above the field */
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: var(--gray-700, #334155) !important;
    line-height: 1.4 !important;
    margin-bottom: 0.3rem !important;
    margin-top: 0 !important;
    border: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: auto !important;
    white-space: normal !important;
}

/* Kill the focus/filled animation state that moves label to top edge */
.form-group input:focus + label,
.form-group select:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:not([value=""]) + label,
.form-group textarea:not(:placeholder-shown) + label {
    position: static !important;
    top: auto !important;
    left: auto !important;
    font-size: 0.8rem !important;
    color: var(--gray-700, #334155) !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    transform: none !important;
}


/* ─────────────────────────────────────
   2. FORM GROUP — no relative position
   Removes the anchor point that lets
   the absolute label float inside.
────────────────────────────────────── */

.form-group {
    position: static !important;
    margin-bottom: 0.9rem !important;
    overflow: visible !important;
}

.form-group::before,
.form-group::after {
    display: none !important;
    content: none !important;
}


/* ─────────────────────────────────────
   3. INPUTS — reset padding and border
   style.css uses padding: 1.5rem top
   to leave room for the floating label.
   We collapse it to a normal 0.65rem.
────────────────────────────────────── */

.form-group input,
.form-group select,
.form-group textarea,
input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
    padding: 0.65rem 0.85rem !important;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    font-family: var(--font-primary, 'Inter', sans-serif) !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
    color: var(--gray-800, #1e293b) !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    box-sizing: border-box;
    min-height: 42px !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

/* Focus */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(59, 130, 246, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
    background: #ffffff !important;
}

/* Hover */
input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
    border-color: rgba(148, 163, 184, 0.55) !important;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
    color: rgba(148, 163, 184, 0.75) !important;
    font-weight: 400 !important;
}


/* ─────────────────────────────────────
   4. TEXTAREA
────────────────────────────────────── */

textarea,
.form-group textarea {
    resize: vertical;
    min-height: 85px !important;
    line-height: 1.6 !important;
}


/* ─────────────────────────────────────
   5. SELECT — custom arrow
────────────────────────────────────── */

select,
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    padding-right: 2.25rem !important;
    cursor: pointer;
}

select option,
.form-group select option {
    color: var(--gray-900, #0f172a) !important;
    background: #ffffff !important;
}


/* ─────────────────────────────────────
   6. FILE INPUT
────────────────────────────────────── */

input[type="file"] {
    padding: 0.5rem 0.75rem !important;
    background-color: rgba(248, 250, 252, 0.9) !important;
    color: var(--gray-600, #475569) !important;
    min-height: auto !important;
    cursor: pointer;
}


/* ─────────────────────────────────────
   7. RANGE SLIDER — restore native
────────────────────────────────────── */

input[type="range"] {
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
    border-radius: 0 !important;
}


/* ─────────────────────────────────────
   8. FORM ROW
────────────────────────────────────── */

.form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.85rem !important;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr !important;
    }
}


/* ─────────────────────────────────────
   9. KILL CYAN UNDERLINE ANIMATION
   style.css: .form-highlight { bottom:0; width:0; }
   grows to 100% on focus — we hide it
────────────────────────────────────── */

.form-highlight {
    display: none !important;
    width: 0 !important;
}


/* ─────────────────────────────────────
   10. QUIZ OPTION BUTTONS
────────────────────────────────────── */

.option-btn {
    border: 1.5px solid rgba(148, 163, 184, 0.25) !important;
    box-shadow: none !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 1rem 1.2rem !important;
    font-size: 0.95rem !important;
    font-family: inherit !important;
    color: var(--gray-700, #334155) !important;
    cursor: pointer;
    text-align: left;
    width: 100%;
    min-height: auto !important;
    transform: none !important;
    transition: border-color 0.15s, background 0.15s !important;
    line-height: 1.5 !important;
}

.option-btn:hover {
    border-color: rgba(59, 130, 246, 0.4) !important;
    background: rgba(239, 246, 255, 0.6) !important;
}

.option-btn.selected {
    border-color: rgba(59, 130, 246, 0.6) !important;
    background: rgba(239, 246, 255, 0.9) !important;
    color: var(--primary-blue-dark, #1d4ed8) !important;
    font-weight: 500 !important;
}

.option-btn.correct {
    border-color: rgba(16, 185, 129, 0.6) !important;
    background: rgba(236, 253, 245, 0.9) !important;
    color: #065f46 !important;
}

.option-btn.incorrect {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: rgba(254, 242, 242, 0.9) !important;
    color: #991b1b !important;
}


/* ─────────────────────────────────────
   11. DARK CARD (homepage dark contact)
────────────────────────────────────── */

.contact-card.dark input,
.contact-card.dark select,
.contact-card.dark textarea {
    background: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.contact-card.dark input::placeholder,
.contact-card.dark textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.contact-card.dark input:focus,
.contact-card.dark select:focus,
.contact-card.dark textarea:focus {
    border-color: rgba(147, 197, 253, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.contact-card.dark .form-group label,
.contact-card.dark label {
    color: rgba(255, 255, 255, 0.75) !important;
}


/* ─────────────────────────────────────
   12. ACCESS CODE SECTION
────────────────────────────────────── */

.access-code-section input {
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

.access-code-section input:focus {
    border-color: rgba(59, 130, 246, 0.55) !important;
}
