/* ========================================
   Contact Form 7 - Minimalist Material Design
   Primary Color: #024A67
   ======================================== */

/* Form container */
.wpcf7-form {
    max-width: 100%;
    font-family: 'Roboto', sans-serif;
}

/* Row layout - 2 columns with Flexbox */
.cf7-row {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    margin-bottom: 30px;
    width: 100%;
    align-items: flex-end;
}
.cf7-col {
    flex: 1 1 calc(50% - 30px);
    min-width: 0;
    position: relative;
    padding-right: 20px;
}
.cf7-col-half {
    flex: 0 0 calc(50% - 30px);
}

/* Labels - Weight 600, Size 16px, Color #024A67 */
.wpcf7-form label {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #024A67;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 5px;
}

/* Inputs & Textareas - Weight 300, border-bottom only */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form textarea {
    width: 100% !important;
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #024A67 !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 12px 0 !important;
    font-size: 16px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 300 !important;
    color: #024A67 !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-width 0.2s ease;
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="number"]:focus,
.wpcf7-form textarea:focus {
    border-bottom-width: 2px !important;
}
/* Placeholder - #024A67 with 40% opacity */
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
    color: rgba(2, 74, 103, 0.4) !important;
    font-style: normal !important;
    font-weight: 300 !important;
}
/* Textarea 100% width */
.wpcf7-form textarea {
    min-height: 60px;
    resize: vertical;
    width: 100% !important;
}

/* ========================================
   Custom Select Menu
   ======================================== */
.cf7-select-wrapper {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
}
.cf7-select-wrapper .wpcf7-form-control-wrap {
    flex: 1;
    display: flex;
    width: 100% !important;
    margin-bottom: 0 !important;
}
.cf7-select-wrapper select,
.cf7-select-wrapper .wpcf7-form-control-wrap select {
    flex: 1;
    width: 100% !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border: none !important;
    border-bottom: 1px solid #024A67 !important;
    border-radius: 0 !important;
    background: transparent none !important;
    background-image: none !important;
    padding: 12px 0 !important;
    padding-right: 70px !important;
    font-size: 16px !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: 300 !important;
    color: rgba(2, 74, 103, 0.6) !important;
    outline: none !important;
    cursor: pointer;
    min-width: 0;
}
/* Hide ALL native select arrows */
.cf7-select-wrapper select::-ms-expand {
    display: none !important;
}
.cf7-select-wrapper .wpcf7-form-control-wrap {
    position: relative;
}
.cf7-select-wrapper .wpcf7-form-control-wrap::after,
.cf7-select-wrapper .wpcf7-form-control-wrap::before,
.cf7-select-wrapper span.wpcf7-form-control-wrap::after,
.wpcf7-form .cf7-select-wrapper select + .select2-container,
.cf7-select-wrapper .select-arrow,
.cf7-select-wrapper .wpcf7-form-control-wrap .select-arrow {
    display: none !important;
    content: none !important;
}
.cf7-select-wrapper select:focus {
    border-bottom-width: 2px !important;
}
/* Square with chevron - positioned relative to wrapper top */
.cf7-select-wrapper::after {
    content: "" !important;
    position: absolute;
    right: 0;
    top: 0;
    width: 45px;
    height: 42px;
    border: 1px solid #024A67 !important;
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23024A67' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transition: all 0.3s ease;
}
/* Chevron effect on hover - subtle background */
.cf7-select-wrapper:hover::after {
    background-color: rgba(2, 74, 103, 0.08);
}
/* Active state for select (via JS class) - blue background, white arrow */
.cf7-select-wrapper.is-open::after {
    background-color: #024A67 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* Custom Select Dropdown (JS generated) */
.cf7-custom-select {
    position: relative;
    width: 100%;
}
.cf7-custom-select .cf7-select-display {
    padding: 12px 0;
    padding-right: 55px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    color: rgba(2, 74, 103, 0.6);
    border-bottom: 1px solid #024A67;
    cursor: pointer;
    background: transparent;
}
.cf7-custom-select .cf7-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #024A67;
    border-top: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.cf7-custom-select.is-open .cf7-select-options {
    max-height: 300px;
    opacity: 1;
    overflow-y: auto;
}
.cf7-custom-select .cf7-select-option {
    padding: 12px 15px;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #024A67;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(2, 74, 103, 0.1);
}
.cf7-custom-select .cf7-select-option:last-child {
    border-bottom: none;
}
.cf7-custom-select .cf7-select-option:hover {
    background-color: rgba(2, 74, 103, 0.08);
}
.cf7-custom-select .cf7-select-option.is-selected {
    background-color: #024A67;
    color: #fff;
}

/* Helper text */
.cf7-helper {
    font-size: 14px !important;
    color: #333 !important;
    font-style: normal !important;
    font-weight: 400 !important;
    margin: 20px 0 30px 0;
    line-height: 1.6;
}

/* File input - Custom upload button */
.wpcf7-form input[type="file"] {
    border: none !important;
    padding: 0 !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    width: 100% !important;
}
.wpcf7-form input[type="file"]::file-selector-button {
    padding: 12px 24px;
    margin-right: 15px;
    border: 1px solid #024A67;
    border-radius: 0;
    background-color: transparent;
    color: #024A67;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}
.wpcf7-form input[type="file"]::file-selector-button:hover {
    background-color: #024A67;
    color: #fff;
}
/* Firefox */
.wpcf7-form input[type="file"]::-webkit-file-upload-button {
    padding: 12px 24px;
    margin-right: 15px;
    border: 1px solid #024A67;
    border-radius: 0;
    background-color: transparent;
    color: #024A67;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}
.wpcf7-form input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #024A67;
    color: #fff;
}

/* ========================================
   Custom Checkbox - 20x20px square
   ======================================== */
.cf7-acceptance {
    margin: 30px 0;
}
.cf7-acceptance .wpcf7-form-control-wrap {
    margin-bottom: 0 !important;
}
.cf7-acceptance .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: flex-start;
}
.cf7-acceptance label.wpcf7-list-item-label,
.cf7-acceptance .wpcf7-list-item-label {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333 !important;
    line-height: 1.6 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    cursor: pointer;
    text-transform: none !important;
    position: relative;
}
/* Hide native checkbox but keep clickable */
.cf7-acceptance input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}
/* Custom checkbox visual - 20x20px square */
.cf7-acceptance .wpcf7-list-item-label::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 1px solid #024A67;
    background: transparent;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}
/* Checked state - SVG checkmark */
.cf7-acceptance input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
    background-color: #024A67;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* ========================================
   Submit Button - Pill shape, transparent bg
   ======================================== */
.cf7-submit-wrapper {
    margin-top: 30px;
}
.cf7-submit-wrapper .wpcf7-form-control-wrap {
    margin-bottom: 0 !important;
}
.wpcf7-form .wpcf7-submit,
.cf7-submit-wrapper .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background-color: transparent !important;
    color: #024A67 !important;
    border: 1px solid #024A67 !important;
    border-radius: 50px !important;
    padding: 12px 20px 12px 25px !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0;
}
/* Circle icon with arrow - use wrapper for positioning */
.cf7-submit-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-top: 30px;
}
.cf7-submit-wrapper .wpcf7-form-control-wrap {
    margin-bottom: 0 !important;
}
.cf7-submit-wrapper .wpcf7-submit {
    padding-right: 65px !important;
}
/* Arrow circle positioned inside button */
.cf7-submit-wrapper::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #024A67;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    transition: all 0.3s ease;
}
/* Hover - fill with #024A67, text white, icon invert */
.wpcf7-form .wpcf7-submit:hover,
.cf7-submit-wrapper .wpcf7-submit:hover {
    background-color: #024A67 !important;
    color: #fff !important;
}
.cf7-submit-wrapper:hover::after {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23024A67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3Cpolyline points='12 5 19 12 12 19'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Conditional groups spacing */
.wpcf7-form [data-class="wpcf7cf_group"] {
    margin-top: 30px;
    width: 100% !important;
}
.wpcf7-form [data-class="wpcf7cf_group"] > label:first-child {
    margin-top: 0;
}
/* More spacing between fields in groups */
.wpcf7-form [data-class="wpcf7cf_group"] > label {
    margin-top: 25px;
    margin-bottom: 8px;
}
.wpcf7-form [data-class="wpcf7cf_group"] > .cf7-select-wrapper {
    margin-bottom: 25px;
}
.wpcf7-form [data-class="wpcf7cf_group"] > .cf7-row {
    margin-top: 25px;
    margin-bottom: 25px;
}

/* Field spacing - ALL fields 100% width */
.wpcf7-form .wpcf7-form-control-wrap {
    display: block;
    width: 100% !important;
    margin-bottom: 25px;
}
.wpcf7-form .wpcf7-form-control-wrap input,
.wpcf7-form .wpcf7-form-control-wrap textarea,
.wpcf7-form .wpcf7-form-control-wrap select,
.wpcf7-form [data-class="wpcf7cf_group"] input,
.wpcf7-form [data-class="wpcf7cf_group"] textarea,
.wpcf7-form [data-class="wpcf7cf_group"] select {
    width: 100% !important;
    max-width: 100% !important;
}
.wpcf7-form [data-class="wpcf7cf_group"] .wpcf7-form-control-wrap {
    width: 100% !important;
    display: block !important;
}
.wpcf7-form .cf7-row .wpcf7-form-control-wrap {
    margin-bottom: 0;
}
.wpcf7-form .cf7-row .cf7-col .wpcf7-form-control-wrap {
    margin-bottom: 0;
}

/* Validation errors */
.wpcf7-form .wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 12px;
    font-weight: 400;
    margin-top: 5px;
}
.wpcf7-form .wpcf7-not-valid {
    border-bottom-color: #dc3545 !important;
}
/* Hide validation errors in hidden conditional groups */
.wpcf7-form [data-class="wpcf7cf_group"]:not([style*="display: block"]) .wpcf7-not-valid-tip,
.wpcf7-form [data-class="wpcf7cf_group"][style*="display: none"] .wpcf7-not-valid-tip {
    display: none !important;
}

/* Response messages */
.wpcf7-form .wpcf7-response-output {
    margin: 20px 0 0 0;
    padding: 15px;
    border-radius: 4px;
    font-weight: 400;
}
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}
.wpcf7-form.sent .wpcf7-response-output {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .cf7-row {
        gap: 40px;
    }
    .cf7-col {
        padding-right: 10px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    /* Reduce container padding (Avada column) - only in main content */
    #main .fusion-layout-column .fusion-column-wrapper.fusion-column-has-shadow {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    /* Form title - centered and smaller - only in main content */
    #main .fusion-title-heading {
        text-align: center !important;
        font-size: 36px !important;
    }
    #main .fusion-title-heading p {
        text-align: center !important;
    }
    /* Subtitle centered - only in main content */
    #main .fusion-text p {
        text-align: center !important;
    }
    .wpcf7-form .cf7-row,
    .wpcf7 .cf7-row,
    .cf7-row {
        display: block !important;
        width: 100% !important;
    }
    .wpcf7-form .cf7-row .cf7-col,
    .wpcf7 .cf7-row .cf7-col,
    .cf7-col,
    .cf7-col-half {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-right: 0 !important;
        margin-bottom: 25px !important;
    }
    .cf7-row .cf7-col:last-child {
        margin-bottom: 0 !important;
    }
    /* Labels */
    .wpcf7-form label {
        font-size: 14px;
        margin-bottom: 8px;
        display: block !important;
    }
    /* Inputs */
    .wpcf7-form input[type="text"],
    .wpcf7-form input[type="email"],
    .wpcf7-form input[type="tel"],
    .wpcf7-form textarea,
    .wpcf7-form select,
    .cf7-custom-select .cf7-select-display {
        font-size: 16px !important;
        padding: 12px 0 !important;
    }
    /* Select wrapper */
    .cf7-select-wrapper {
        width: 100% !important;
    }
    /* Select arrow box */
    .cf7-select-wrapper::after {
        width: 40px;
        height: 40px;
    }
    /* Custom select dropdown */
    .cf7-custom-select {
        width: 100% !important;
    }
    .cf7-custom-select .cf7-select-options {
        position: absolute;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000;
    }
    .cf7-custom-select .cf7-select-option {
        padding: 12px 15px;
        font-size: 15px;
    }
    /* Helper text */
    .cf7-helper {
        font-size: 13px !important;
        margin: 15px 0 20px 0;
    }
    /* Checkbox */
    .cf7-acceptance .wpcf7-list-item-label {
        font-size: 13px !important;
    }
    /* Submit button */
    .cf7-submit-wrapper input[type="submit"] {
        font-size: 14px !important;
        padding: 12px 50px 12px 20px !important;
    }
    .cf7-submit-wrapper::after {
        width: 28px;
        height: 28px;
        right: 8px;
    }
    /* File upload */
    .wpcf7-form input[type="file"]::file-selector-button,
    .wpcf7-form input[type="file"]::-webkit-file-upload-button {
        padding: 10px 16px;
        font-size: 12px;
    }
    /* Conditional groups spacing */
    .wpcf7-form [data-class="wpcf7cf_group"] > label {
        margin-top: 20px;
    }
    .wpcf7-form [data-class="wpcf7cf_group"] > .cf7-row {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    /* Conditional groups rows */
    .wpcf7-form [data-class="wpcf7cf_group"] .cf7-row {
        flex-direction: column !important;
        gap: 30px !important;
    }
    .wpcf7-form [data-class="wpcf7cf_group"] .cf7-col {
        flex: 1 1 100% !important;
        width: 100% !important;
        padding-right: 0 !important;
    }
}

/* Responsive - Small mobile */
@media (max-width: 480px) {
    .cf7-submit-wrapper input[type="submit"] {
        width: 100%;
        text-align: left;
    }
    .wpcf7-form input[type="file"]::file-selector-button,
    .wpcf7-form input[type="file"]::-webkit-file-upload-button {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
        width: 100%;
        text-align: center;
    }
}
