/* Modern Form Styling */
:root {
    --primary-color: #046b99;
    --secondary-color: #173f5f;
    --accent-color: #ed553b;
    --light-gray: #f4f4f4;
    --mid-gray: #e0e0e0;
    --dark-gray: #333;
    --error-color: #d32f2f;
    --success-color: #388e3c;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    font-size: .85rem;
}

.container {
    max-width: auto;
    margin: 0 auto;
    padding: 20px;
}

.container-form {
    max-width: 850px;
}


.form-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 5px 5px 0 0;
    margin-bottom: 0;
}

.form-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
}

.form-header p {
    margin-top: 10px;
    font-size: 16px;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--mid-gray);
}

.section-title {
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.form-group {
    flex: 1 1 300px;
    margin-right: 20px;
    margin-bottom: 15px;
}

.form-group:last-child {
   /* margin-right: 0;*/
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-gray);
}

.required-label::after {
    content: "*";
    color: var(--error-color);
    margin-left: 5px;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--mid-gray);
    border-radius: 4px;
    background-color: white;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 107, 153, 0.1);
}

::placeholder {
    color: #aaaaaa;
    font-style: italic;
    opacity: 1; /* Firefox requires this */
}

/* For Internet Explorer 10-11 */
:-ms-input-placeholder {
    color: #aaaaaa;
    font-style: italic;
}

/* For Microsoft Edge */
::-ms-input-placeholder {
    color: #aaaaaa;
    font-style: italic;
}

/* For older WebKit browsers */
::-webkit-input-placeholder {
    color: #aaaaaa;
    font-style: italic;
}
.error-field {
    border-color: var(--error-color) !important;
}

.input-append {
    display: flex;
    align-items: center;
}

.input-append input {
    flex: 1;
    border-radius: 4px 0 0 4px;
}

.input-append a {
    display: inline-block;
    background: var(--light-gray);
    padding: 13px 15px;
    border-radius: 0 4px 4px 0;
    text-decoration: none;
    color: var(--dark-gray);
    border: 1px solid var(--mid-gray);
    border-left: none;
    transition: background-color 0.3s;
    margin-left: 10px;
}

.input-append a:hover {
    background-color: var(--mid-gray);
}

.social-more {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.social-more input {
    flex: 1;
}

.social-more a {
    margin-left: 10px;
    color: var(--accent-color);
    text-decoration: none;
}

.social-more a:hover {
    text-decoration: underline;
}

.add-more-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.add-more-btn:before {
    content: "+";
    margin-right: 5px;
    font-weight: bold;
}

.add-more-btn:hover {
    text-decoration: underline;
}

.error {
    color: var(--error-color);
    margin-top: 5px;
    display: none;
}

.error-field {
    border-color: var(--error-color) !important;
}

/* Add animation for error messages */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.error[style*="display: block"] {
    animation: fadeIn 0.3s ease-in-out;
}
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.checkbox-container input[type="checkbox"] {
    margin-top: 6px;
    margin-right: 10px;
}

.checkbox-container span {
    flex: 1;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

.submit-btn:disabled {
    background-color: var(--mid-gray);
    cursor: not-allowed;
}
/* hCaptcha styles */
.captcha-container {
    margin: 20px 0;
    position: relative;
}

#h-captcha_error {
    color: #e74c3c;
    font-weight: 600;
    margin-top: 10px;
    padding: 8px;
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    border-radius: 3px;
}

.message {
    background-color: #e8f5e9;
    border-left: 5px solid var(--success-color);
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.message h3 {
    color: var(--success-color);
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
}

.whatisthis {
    display: inline-block;
    margin-left: 10px;
    color: var(--primary-color);
    text-decoration: none;
}

.whatisthis:hover {
    text-decoration: underline;
}

.arrow_left {
    display: none;
}

/* Responsive styling */
@media (max-width: 768px) {
    .form-group {
        flex: 1 1 100%;
        margin-right: 0;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-container {
        padding: 20px;
    }
}

/* Radio button section specific styles */
.radio-group {
    flex: 1 1 100%;
    margin-bottom: 0; 
}

.radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    padding: 15px 20px;
    border-radius: 5px;
    border: 1px solid var(--mid-gray);
    transition: all 0.2s ease;
    width:100%;
    flex-wrap: wrap;
}

.radio-option:hover {
    background-color: #f0f0f0;
}

.radio-option input[type="radio"]:checked + label + .radio-option {
    border-color: var(--primary-color);
    background-color: rgba(4, 107, 153, 0.05);
}

/* Keep the rest of the radio styles the same */
.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-option label {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.radio-option label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mid-gray);
    border-radius: 50%;
    background: white;
    transition: all 0.2s ease;
}


.radio-option input[type="radio"]:checked + label::before {
    border-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + label {
    font-weight: 500;
}

.radio-option label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0);
}

.radio-option input[type="radio"]:checked + label::after {
    opacity: 1;
    transform: scale(1);
}

.radio-options.error-highlight {
    border: 1px solid var(--error-color);
    border-radius: 5px;
    padding: 5px;
    background-color: rgba(255, 0, 0, 0.05);
}

.radio-option span {
    margin: 0px 0px 0px 10px;
    font-size: 11px;
    font-style: italic;
}

/* Checkbox styles */
.checkbox-group {
    margin-top: 20px;
}

.checkbox-container {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-container label {
    position: relative;
    cursor: pointer;
    padding-left: 10px;
    margin-left: -10px; /* Offset the padding */
    flex: 1;
}

.checkbox-container label:before {
    content: '';
    position: absolute;
    left: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--mid-gray);
    background-color: white;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.checkbox-container input:checked + label:before {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container label:after {
    content: '';
    position: absolute;
    left: -23px;
    top: 3px;
    width: 6px;  
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: all 0.2s ease;
}

.checkbox-container input:checked + label:after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

.checkbox-container input:focus + label:before {
    box-shadow: 0 0 0 3px rgba(4, 107, 153, 0.1);
}

/* Error message for checkboxes */
#checkbox_error {
    color: var(--error-color);
    margin-bottom: 10px;
    display: none;
}

/* Required field indicator */
.required-checkbox + label:after {
    content: "*";
    color: var(--error-color);
    margin-left: 5px;
}
.error-highlight label:before {
    border-color: var(--error-color) !important;
}

#checkbox_error {
    color: var(--error-color);
    margin-bottom: 10px;
    display: none;
}
.message_optout {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

 /* Styling for the loader */
.loaderajax {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #ffffff;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.5s ease-out;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Position the submit button text and make room for the spinner */
.submit-btn {
    position: relative;
}

/* When loading, change the button appearance */
.submit-btn.loading {
    background-color: #909090; /* Slightly darker background to indicate processing */
    cursor: not-allowed;
    padding-right: 50px
}

/* Styling for custom popover */
.custom-popover {
    position: absolute;
    z-index: 1000;
    max-width: 750px;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
}

.custom-popover-header {
    padding: 8px 14px;
    background-color: #f7f7f7;
    border-bottom: 1px solid #ebebeb;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-popover-close {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    padding: 0;
    cursor: pointer;
    margin-left: 10px;
}

.custom-popover-close:hover {
    opacity: 0.75;
}

.custom-popover-body {
    padding: 9px 14px;
}

.custom-popover-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

.whatisthis {
    color: #007bff;
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.9em;
    text-decoration: none;
}

.whatisthis:hover {
    text-decoration: underline;
}

    /* Custom select styling */
    .custom-select-container {
        position: relative;
        width: 100%;
    }
    
    .custom-select-input {
        width: 100%;
        padding: 10px 14px;
        border: 1px solid #ccc;
        border-radius: 4px;
        background-color: #fff;
        font-size: 14px;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
    }
    
    .custom-select-input:focus {
        outline: none;
        border-color: #1a73e8;
        box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    }
    
    /* Error state styling */
    .custom-select-input.error-field {
        border-color: #dc3545;
        background-color: #fff8f8;
    }
    
    .custom-select-input.error-field:focus {
        box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25);
    }
    
    .custom-select {
        display: none; /* Hide the actual select */
    }
    
    .select-arrow {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 6px solid #555;
        pointer-events: none;
    }
    
    /* Custom dropdown styling */
    .custom-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 250px;
        overflow-y: auto;
        background: white;
        border: 1px solid #ccc;
        border-radius: 0 0 4px 4px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 100;
        display: none;
    }
    
    .dropdown-option {
        padding: 10px 14px;
        cursor: pointer;
    }
    
    .dropdown-option:hover, .dropdown-option.highlighted {
        background-color: #f0f7ff;
    }
    
    /* Mobile optimizations */
    @media (max-width: 768px) {
        .custom-select-input {
            padding: 12px 14px; /* Larger touch target on mobile */
            font-size: 16px; /* Prevent zoom on iOS */
        }
        
        .dropdown-option {
            padding: 12px 14px; /* Larger touch targets on mobile */
        }
        
        .custom-dropdown {
            max-height: 200px; /* Smaller on mobile to not take over the screen */
        }
    }
    .required-fields-note {
        font-style: italic;
        font-size: 0.65em;
        color: #666;
        margin-left: 10px;
        display: inline-block;
    }

    .asterisk {
        color: #ff0000;
    }
