/* Contact Form Validation Styles */

/* Form field error states */
.type-feild input.error,
.type-feild textarea.error,
.input input.error,
#form_message.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Error message styling */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

/* Error message positioning for index page form */
.contact-block .error-message {
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Textarea container for proper error positioning */
.textarea-container {
    position: relative;
}

.textarea-container .error-message {
    margin-top: 5px;
    margin-bottom: 0;
}

.captcha-error {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

/* Success and Error Alert Styles */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

.alert .close-alert {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.alert .close-alert:hover {
    opacity: 1;
}

/* Loading state for submit button */
.btn-two:disabled,
.btn-two-rounded:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-two .fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* reCAPTCHA v3 is invisible, no container needed */

/* Form field focus states */
.type-feild input:focus,
.type-feild textarea:focus,
.input input:focus,
#form_message:focus {
    outline: none;
    border-color: #1A4137;
    box-shadow: 0 0 0 0.2rem rgba(26, 65, 55, 0.25);
}

/* Success state for valid fields */
.type-feild input.valid,
.type-feild textarea.valid,
.input input.valid,
#form_message.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Required field indicator */
.type-feild .required-indicator {
    color: #dc3545;
    font-weight: bold;
}

/* Form validation message container */
.form-messages {
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .alert {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .error-message {
        font-size: 12px;
    }
    
    .captcha-error {
        font-size: 12px;
    }
}

/* Animation for error messages */
.error-message {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation for alert messages */
.alert {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* reCAPTCHA v3 styling */
.grecaptcha-badge {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Show reCAPTCHA badge on hover over forms (optional) */
.contact-section:hover .grecaptcha-badge,
.contact-details:hover .grecaptcha-badge {
    visibility: visible;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* Radio Button Styling */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 16px;
    color: #000;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ddd;
    border-radius: 50%;
    background-color: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.radio-option input[type="radio"]:checked {
    border-color: #1A4137;
    background-color: #1A4137;
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
}

.radio-option input[type="radio"]:hover {
    border-color: #1A4137;
    box-shadow: 0 0 0 3px rgba(26, 65, 55, 0.1);
}

.radio-option input[type="radio"]:focus {
    outline: none;
    border-color: #1A4137;
    box-shadow: 0 0 0 3px rgba(26, 65, 55, 0.2);
}

.radio-option label {
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0;
    user-select: none;
    transition: color 0.3s ease;
}

.radio-option:hover label {
    color: #1A4137;
}

.radio-option input[type="radio"]:checked + label {
    color: #1A4137;
    font-weight: 600;
}

/* Radio button error state */
.radio-group.error input[type="radio"] {
    border-color: #dc3545;
}

.radio-group.error .radio-option label {
    color: #dc3545;
}


/* Responsive radio buttons */
@media (max-width: 576px) {
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-label {
        font-size: 15px;
    }
    
    .radio-option label {
        font-size: 14px;
    }
}