/* Spam Protection Form Styles */

.spam-protection-form-wrapper {
    /* max-width: 600px; */
    margin: 0 auto;
    padding: 20px 0;
}

.spam-protected-form {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 30px;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); */
}

.form-title {
    margin-bottom: 20px;
}

.form-field.required-field .field-label::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
}

/* Select dropdown styles */
select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

/* Checkbox and radio styles */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
    margin-bottom: 0 !important;
}

.checkbox-text,
.radio-text {
    font-weight: normal;
    margin: 0;
    line-height: 1.4;
}

/* Radio group styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px !important;
}

/* Submit button styles */
.submit-field {
    margin-top: 30px;
    text-align: center;
}

.submit-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    position: relative;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.submit-button:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-loading {
    display: inline-block;
}

/* Message styles */
.form-messages {
    margin-top: 20px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #27ae60;
    font-weight: 500;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #e74c3c;
    font-weight: 500;
}

/* reCAPTCHA styles */
.recaptcha-field {
    text-align: center;
    margin: 25px 0;
}

.g-recaptcha {
    display: inline-block;
}

/* Honeypot fields - ensure they're completely hidden */
.honeypot-fields {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Character counter */
.char-counter {
    font-size: 12px;
    color: #6c757d;
    text-align: right;
    margin-top: 5px;
}

.char-counter-warning {
    color: #e74c3c;
    font-weight: 600;
}

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

.button-loading::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .spam-protection-form-wrapper {
        padding: 15px;
    }
    
    .spam-protected-form {
        padding: 20px 15px;
    }
    
    .form-title {
        font-size: 20px;
    }
    
    .submit-button {
        width: 100%;
        padding: 15px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .spam-protection-form-wrapper {
        padding: 10px;
    }
    
    .spam-protected-form {
        padding: 15px 10px;
    }
    
    .radio-group {
        gap: 5px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 3px;
    }
    
    .submit-button {
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .form-field,
    .form-control,
    .submit-button {
        transition: none;
    }
    
    .button-loading::before {
        animation: none;
        border-top-color: #ffffff;
    }
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Create a container for the three fields on desktop */
.form-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Target the specific fields that should be in one row */
.field-name,
.field-email,
.field-phone {
    margin-bottom: 0; /* Remove bottom margin since we're using gap */
}

/* Responsive behavior for tablets and mobile */
@media (max-width: 1024px) {
    .form-fields-row {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 15px;
    }
    
    .field-name,
    .field-email,
    .field-phone {
        margin-bottom: 15px; /* Add back margin for stacked layout */
    }
}

/* Alternative Flexbox approach if you prefer */
.form-fields-row-flex {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-fields-row-flex .form-field {
    flex: 1;
}

@media (max-width: 1024px) {
    .form-fields-row-flex {
        flex-direction: column;
        gap: 15px;
    }
}