/**
 * ABC Project - Custom Registration Fields Styles
 */

/* Wrapper for custom fields */
.abc-custom-fields-wrapper {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e4e6eb;
}

/* Required field indicator */
.tutor-required {
    color: #dc3545;
    margin-left: 2px;
}

/* Dropdown and input styling */
.abc-custom-fields-wrapper .tutor-form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #cdcfd5;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.abc-custom-fields-wrapper .tutor-form-control:focus {
    border-color: #3e64de;
    box-shadow: 0 0 0 3px rgba(62, 100, 222, 0.1);
    outline: none;
}

.abc-custom-fields-wrapper select.tutor-form-control {
    cursor: pointer;
    background-color: #fff;
    appearance: auto;
}

/* Checkbox group styling */
.abc-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    padding: 10px 0;
}

.abc-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #e4e6eb;
    border-radius: 6px;
    background: #f9fafb;
    transition: all 0.2s ease;
    font-size: 14px;
    user-select: none;
}

.abc-checkbox-label:hover {
    background: #f0f2f5;
    border-color: #cdcfd5;
}

.abc-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.abc-checkbox-label input[type="checkbox"]:checked + span,
.abc-checkbox-label:has(input:checked) {
    background: #e7ecfc;
    border-color: #3e64de;
}

/* Disabled state for checkboxes */
.abc-checkbox-label.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.abc-checkbox-label.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

/* Prefer not to answer special styling */
.abc-checkbox-label.prefer-not-answer {
    background: #fff3cd;
    border-color: #ffc107;
}

.abc-checkbox-label.prefer-not-answer:hover {
    background: #ffe69c;
}

/* Other option styling */
.abc-checkbox-label.other-option {
    background: #e8f4f8;
    border-color: #17a2b8;
}

.abc-checkbox-label.other-option:hover {
    background: #d1ecf1;
}

/* Consent checkbox styling */
.abc-consent-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e4e6eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.abc-consent-checkbox:hover {
    border-color: #3e64de;
    background: #f0f4ff;
}

.abc-consent-checkbox input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    min-width: 18px;
    min-height: 18px;
    cursor: pointer;
}

.abc-consent-text {
    font-size: 13px;
    line-height: 1.6;
    color: #495057;
}

/* Conditional "Other" text field wrappers */
#training_program_other_wrapper,
#gender_other_wrapper,
#orientation_other_wrapper {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: -10px;
    margin-bottom: 15px;
    border-left: 3px solid #3e64de;
}

#training_program_other_wrapper .tutor-form-group,
#gender_other_wrapper .tutor-form-group,
#orientation_other_wrapper .tutor-form-group {
    margin-bottom: 0;
}

/* Form labels */
.abc-custom-fields-wrapper .tutor-form-group > label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .abc-checkbox-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .abc-checkbox-label {
        width: 100%;
        justify-content: flex-start;
    }
    
    .abc-consent-checkbox {
        padding: 12px;
    }
    
    .abc-consent-text {
        font-size: 12px;
    }
}

/* Animation for conditional fields */
#training_program_other_wrapper,
#gender_other_wrapper,
#orientation_other_wrapper {
    overflow: hidden;
}

/* Error state */
.abc-custom-fields-wrapper .tutor-form-group.has-error .tutor-form-control {
    border-color: #dc3545;
}

.abc-custom-fields-wrapper .tutor-form-group.has-error .abc-checkbox-group {
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 10px;
}

/* Tutor LMS specific overrides */
.tutor-dashboard-content .abc-custom-fields-wrapper .tutor-form-row {
    margin-bottom: 20px;
}

.tutor-dashboard-content .abc-custom-fields-wrapper .tutor-form-group {
    margin-bottom: 0;
}
