/**
 * File: assets/css/case-medinsurance.css
 * CASE MEDINSURANCE Checkout Form Styles
 */

/* Main heading for medical sections */
#case_medical_sections_heading {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    clear: both;
    font-size: 1.5em;
}

/* Accordion styling */
.case-accordion {
    margin-bottom: 25px;
    border: 1px solid #d3d3d3;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background-color: #fff;
}

.case-accordion-header {
    background-color: #f8f8f8;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    border-bottom: 1px solid #e2e2e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: background-color 0.2s ease;
    font-size: 1.1em;
}

.case-accordion-header:hover {
    background-color: #f0f0f0;
}

.case-accordion-header:after {
    content: '\f347';
    font-family: dashicons;
    float: right;
    font-size: 20px;
    color: #666;
    transition: transform 0.2s ease;
}

.case-accordion-header.active {
    background-color: #f0f0f0;
    border-bottom-color: #d3d3d3;
}

.case-accordion-header.active:after {
    content: '\f343';
    transform: rotate(0deg);
}

.case-accordion-content {
    display: none;
    padding: 0;
    background-color: #fff;
}

.case-accordion-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Fieldset layout */
.accordion-fieldset {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    width: 100%;
}

.accordion-fieldset p {
    flex: 1;
}

.medical-category-fieldset {
    flex: 1;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.medical-category-fieldset:not(:first-child) {
    margin-left: 20px; /* Adds margin to all items except the first */
}

.medical-category-fieldset legend {
    font-weight: bold;
    padding: 0 10px;
    width: auto !important;
    float: none !important;
    margin-bottom: 5px !important;
    font-size: 14px !important;
}

.medical-condition-field {
    margin: 8px 0;
}

.medical-condition-field label {
    display: flex !important;
    align-items: flex-start;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 1.4;
}

.medical-condition-field input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px; /* Aligns checkbox with text */
}

/* Medical declaration notice */
.medical-declaration-notice {
    font-size: 12px;
    background-color: #f8f8f8;
    padding: 15px;
    border-left: 4px solid #666;
    margin-bottom: 20px;
    color: #333;
}

/* Additional health fields */
#additional_health_fields {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f8f8f8;
}

#additional_health_fields h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
}

#additional_health_fields p {
    font-weight: 500;
    margin-bottom: 10px;
}

/* Gender specific questions */
.female-specific-question,
.male-specific-question {
    padding: 0;
    border-left: none !important;
    margin-left: 0;
    margin-bottom: 15px;
}

/* Radio options */
.radio-options {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.radio-options label {
    display: flex !important;
    align-items: center;
    margin: 0 !important;
    cursor: pointer;
    padding: 0 !important;
}

.radio-options input[type="radio"] {
    margin-right: 5px;
}
.radio-question{
    border:none !important;
}
/* Conditional detail fields */
.case_surgical_details,
.case_other_medical_details,
.case_hospitalized_details,
.case_medication_details,
.case_screening_details,
.case_health_concerns_details,
.case_dependant_allergies_details,
.case_dependant_surgical_details,
.case_dependant_other_medical_details,
.case_dependant_hospitalized_details,
.case_dependant_medication_details,
.case_dependant_screening_details,
.case_dependant_health_concerns_details {
    margin-top: 10px;
    padding: 10px;
    border-radius: 0 !important;
    border: none !important;
}

/* Form rows */
.form-row {
    margin-bottom: 15px;
}

.form-row label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.form-row textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Dependant specific styles */
.dependant-section {
    border: none !important;
    border-radius: 4px;
    margin-bottom: 20px;
    background-color: #fafafa;
    padding: 0 !important;
    box-shadow: none !important;
    
}

.dependant-section h3 {
    background-color: #f0f0f0;
    padding: 15px;
    margin: 0;
    font-size: 1.1em;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.dependant-details {
    padding: 0 !important;
}

/* Dependant actions buttons */
.dependant-actions {
    position: relative !important;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.toggle-dependant, 
.remove-dependant {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.toggle-dependant:hover {
    background-color: #e8e8e8;
}

.remove-dependant {
    color: #cc0000;
}

.remove-dependant:hover {
    background-color: #fee;
    border-color: #cc0000;
}

/* Name fields row */
.dependant-name-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.dependant-name-row > div {
    flex: 1;
}

.dependant-name-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.dependant-name-row input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Add dependant button */
.add-dependant-btn {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 20px;
    transition: background-color 0.2s ease;
}

.add-dependant-btn:hover {
    background-color: #45a049;
}

/* Hidden elements */
.hidden {
    display: none !important;
}

/* Ensure template is never displayed */
.dependant-template {
    display: none !important;
}

/* Required indicators */
.required:after {
    content: ' *';
    color: #cc0000;
    font-weight: bold;
}

/* Checkbox and radio enhancements */
input[type="checkbox"], 
input[type="radio"] {
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
    width: auto !important;
}

/* Fix for radio buttons */
.radio-options {
    display: flex;
    gap: 15px;
    margin: 5px 0 10px;
}

.radio-options label {
    display: inline-flex !important;
    align-items: center;
    cursor: pointer;
    margin: 0 !important;
}

.radio-options input[type="radio"] {
    margin-right: 5px;
    position: relative;
    top: 0;
}

/* Ensure proper text area styling */
.dependant-section textarea,
.case-accordion textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Fix for medical categories */
.medical-category h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 1.1em;
}

.case-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

/* Woocommerce style enhancements */
.woocommerce-form-fields {
    margin-bottom: 20px;
}

.form-field-wrapper {
    margin-bottom: 15px;
}

/* Fix WooCommerce radio button spacing */
.woocommerce-input-wrapper label {
    display: inline-flex !important;
    margin-right: 15px !important;
    align-items: center;
}

/* Fix for conditional details fields */
.case_surgical_details,
.case_other_medical_details,
.case_hospitalized_details,
.case_medication_details,
.case_screening_details,
.case_health_concerns_details,
.case_dependant_allergies_details,
.case_dependant_surgical_details,
.case_dependant_other_medical_details,
.case_dependant_hospitalized_details,
.case_dependant_medication_details,
.case_dependant_screening_details,
.case_dependant_health_concerns_details {
    margin: 0 !important;
    padding: 10px;
    border-radius: 0 !important;
    border: none !important;
    background-color: #FFFFFF !important;
}

/* Additional fix for checkbox display in medical category fieldsets */
.medical-category-fieldset {
    padding: 15px;
    margin: 0 0 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.medical-category-fieldset legend {
    padding: 0 10px;
    font-weight: bold;
    margin-bottom: 5px;
    width: auto;
}

.medical-condition-field {
    margin: 10px 0;
    padding: 5px 0;
}

.medical-condition-field label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
}

.medical-condition-field input[type="checkbox"] {
    margin-right: 8px;
    position: relative;
    top: 0;
}

/* Ensure field groups have proper styling */
.case-field-group {
    margin-bottom: 25px;
}

/* Medical questionnaire form row styling */
.medical-questionnaire .form-row {
    padding: 10px 0;
    border-bottom: none;
}

.medical-questionnaire .form-row:last-child {
    border-bottom: none;
}

.medical-questionnaire p {
    font-weight: normal;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .accordion-fieldset {
        flex-direction: column;
    }
    
    .medical-category-fieldset:not(:first-child) {
        margin-left: 0;
        margin-top: 20px;
    }
    
    .dependant-name-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .dependant-actions {
        position: static;
        display: flex;
        justify-content: flex-end;
        margin-top: 10px;
        transform: none;
    }
    
    .dependant-section h3 {
        padding-bottom: 40px;
    }
    
    .radio-options {
        flex-direction: column;
        gap: 5px;
    }
    
    .case-checkbox-group {
        display: block;
    }
}

.radio{
position:relative !important;
}

/* Fix for WooCommerce styling conflicts */
.woocommerce form .form-row .woocommerce-input-wrapper {
    width: 100%;
}

.woocommerce-checkout fieldset {
    padding: 15px !important;
    margin: 0 !important;
}

/* Ensure proper spacing for dependent section */
.dependant-section #additional_health_fields {
    margin-top: 30px;
    margin-bottom: 0;
}

/* Fix for specific checkboxes */
.checkbox-item label {
    display: flex !important;
    align-items: flex-start;
}

.checkbox-item input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
}

/* Add clearfix to ensure proper layout */
.accordion-fieldset:after {
    content: "";
    display: table;
    clear: both;
}

/* Make sure form fields have consistent styling */
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Ensure radio buttons and descriptions are properly aligned */
.form-row p {
    margin-bottom: 5px !important;
}

/* Override some WooCommerce default styles */
.woocommerce form .form-row .woocommerce-input-wrapper {
    display: block;
    width: 100%;
}

/* Ensure file upload fields look consistent */
input[type="file"] {
    padding: 5px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}


//* Additional CSS specifically for dependant medical sections */
.dependant-section .medical-category {
    margin-bottom: 20px;
}

.dependant-section .medical-category h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 1.1em;
}

.dependant-section .case-checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.dependant-section .medical-condition-field {
    margin: 8px 0;
}

.dependant-section .medical-condition-field label {
    display: flex !important;
    align-items: flex-start;
    margin-bottom: 0 !important;
    padding: 0 !important;
    line-height: 1.4;
}

.dependant-section .medical-condition-field input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px; /* Aligns checkbox with text */
}

.dependant-section .medical-questionnaire .form-row {
    padding: 10px 0;
    border-bottom: none;
}

.dependant-section .medical-questionnaire p {
    font-weight: normal;
    color: #333;
}

.dependant-section .radio-question {
    border: none !important;
}

/* Update the existing dependant section styles to better match medical section */
.dependant-section {
    border: 1px solid #d3d3d3;
    border-radius: 4px;
    margin-bottom: 25px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dependant-header, .dependant-section h3 {
    background-color: #f8f8f8;
    padding: 15px 20px;
    font-weight: bold;
    border-bottom: 1px solid #e2e2e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    transition: background-color 0.2s ease;
    font-size: 1.1em;
    margin-top: 0;
}

.dependant-details {
    padding: 20px;
    background-color: #fff;
}

/* Make the dependant medical categories consistent with primary medical categories */
.dependant-medical-section h4,
.dependant-health-questions h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    font-size: 1rem !important;
}

/* Ensure medical category boxes are styled consistently */
.dependant-section .medical-category-box {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
}

.dependant-section .medical-category-box h5 {
    padding: 0 10px;
    font-weight: bold;
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.dependant-section .medical-condition-field {
    margin: 10px 0;
    padding: 5px 0;
}

.dependant-section .medical-condition-field label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
}

.dependant-section .medical-condition-field input[type="checkbox"] {
    margin-right: 8px;
    position: relative;
    top: 0;
}

/* Ensure conditional fields have consistent styling */
.case_surgical_details,
.case_other_medical_details,
.case_hospitalized_details,
.case_medication_details,
.case_screening_details,
.case_health_concerns_details,
.case_dependant_allergies_details,
.case_dependant_surgical_details,
.case_dependant_other_medical_details,
.case_dependant_hospitalized_details,
.case_dependant_medication_details,
.case_dependant_screening_details,
.case_dependant_health_concerns_details {
    margin-top: 10px;
    padding: 10px;
    border-radius: 0 !important;
    border: none !important;
    background-color: #FFFFFF !important;
    margin-left: 15px;
    border-left: none !important;
}

/* Consistent form row styling */
.dependant-section .form-row,
.medical-questionnaire .form-row {
    padding: 10px 0;
    margin-bottom: 15px;
}

/* Make the medical categories grid layout consistent */
.medical-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 15px 0;
}

@media (max-width: 768px) {
    .medical-categories-grid {
        grid-template-columns: 1fr;
    }
}

.wcf-embed-checkout-form.wcf-field-modern-label .woocommerce #customer_details .form-row:not(.wcf-anim-hidden-label) label:not(.woocommerce-form__label-for-checkbox, .checkbox, .input-radio){
    position: static !important;
}

.wcf-embed-checkout-form.wcf-field-modern-label .woocommerce #customer_details .form-row:not(.wcf-anim-hidden-label) label:not(.woocommerce-form__label-for-checkbox, .checkbox, .input-radio) {
    padding: 0 !important;

  }