/* ============================================
   ELEGANT CUSTOM INPUTS
   Sophisticated checkboxes and radio buttons
   ============================================ */

/* ===== RESET DEFAULT APPEARANCE ===== */

input[type="checkbox"],
input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
}

/* ===== CUSTOM CHECKBOXES ===== */

input[type="checkbox"] {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 6px;
    background-color: rgba(248, 250, 252, 0.5);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 12px;
    display: inline-block;
    vertical-align: middle;
}

input[type="checkbox"]:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background-color: rgba(255, 251, 240, 0.8);
}

input[type="checkbox"]:checked {
    background-color: #64748b;
    border-color: #64748b;
}

input[type="checkbox"]:checked::after,
input[type="checkbox"][data-checked="true"]::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white !important;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    display: block !important;
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* ===== CUSTOM RADIO BUTTONS ===== */

input[type="radio"] {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 50%;
    background-color: rgba(248, 250, 252, 0.5);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 12px;
    display: inline-block;
    vertical-align: middle;
}

input[type="radio"]:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background-color: rgba(255, 251, 240, 0.8);
}

input[type="radio"]:checked {
    border-color: #D4AF37;
    background-color: rgba(212, 175, 55, 0.1);
}

input[type="radio"]:checked::after,
input[type="radio"][data-checked="true"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #D4AF37 !important;
    display: block !important;
}

input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

/* ===== LABEL STYLING ===== */

label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: #1e293b;
    line-height: 1.6;
}

label:hover input[type="checkbox"],
label:hover input[type="radio"] {
    border-color: rgba(212, 175, 55, 0.5);
}

/* ===== SPECIFIC CONTEXTS ===== */

/* Verification checkbox */
.verification-box input[type="checkbox"],
.form-check input[type="checkbox"] {
    margin-right: 12px;
}

.verification-box label,
.form-check-label {
    font-size: 15px;
    color: #475569;
    line-height: 1.7;
}

/* Willingness to relocate radio buttons */
.relocate-options input[type="radio"] {
    margin-right: 12px;
}

.relocate-option-label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    color: #1e293b;
    margin-bottom: 16px;
}

/* Value tags (Section 3) - keep existing functionality */
.value-tag {
    /* Keep existing styles */
}

/* ===== DISABLED STATE ===== */

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="checkbox"]:disabled:hover,
input[type="radio"]:disabled:hover {
    border-color: rgba(100, 116, 139, 0.3);
    background-color: rgba(248, 250, 252, 0.5);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    input[type="checkbox"],
    input[type="radio"] {
        width: 22px;
        height: 22px;
    }
    
    input[type="checkbox"]:checked::after {
        font-size: 14px;
    }
    
    input[type="radio"]:checked::after {
        width: 10px;
        height: 10px;
    }
    
    label {
        font-size: 14px;
    }
}

/* ===== ACCESSIBILITY ===== */

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* ===== ANIMATIONS ===== */

@keyframes checkmark-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

input[type="checkbox"]:checked::after {
    animation: checkmark-pop 0.3s ease;
}

@keyframes radio-pop {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

input[type="radio"]:checked::after {
    animation: radio-pop 0.3s ease;
}

/* ===== OVERRIDE ANY CONFLICTING STYLES ===== */

input[type="checkbox"],
input[type="radio"] {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
    position: relative !important;
}

/* Remove any custom checkmark spans that might be interfering */
.checkmark-custom {
    display: none !important;
}

/* ===== SPECIFIC FIX FOR VERIFICATION CONSENT ===== */

#verification-consent,
#background-check {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

.checkbox-container {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

.checkbox-text {
    flex: 1;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    color: #475569;
    line-height: 1.7;
}
