/* Contact Form Pro - Frontend Styles */

.cfp-contact-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cfp-form-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.cfp-contact-form {
    width: 100%;
}

.cfp-form-group {
    margin-bottom: 20px;
}

.cfp-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.cfp-required {
    color: #e74c3c;
}

.cfp-input,
.cfp-textarea,
.cfp-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.cfp-input:focus,
.cfp-textarea:focus,
.cfp-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.cfp-textarea {
    resize: vertical;
    min-height: 120px;
}

.cfp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.cfp-checkbox {
    width: auto !important;
    margin: 0;
    flex-shrink: 0;
}

.cfp-checkbox-text {
    font-size: 14px;
    line-height: 1.4;
}

/* Honeypot field - hidden from users */
.cfp-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.cfp-honeypot-field {
    width: 1px !important;
    height: 1px !important;
    border: none !important;
    background: transparent !important;
}

/* Captcha styling */
.cfp-captcha-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.cfp-captcha-input {
    max-width: 100px;
}

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

.cfp-submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
}

.cfp-submit-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

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

.cfp-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.cfp-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: cfp-spin 1s linear infinite;
}

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

/* Messages */
.cfp-form-messages {
    margin-bottom: 20px;
    border-radius: 6px;
    padding: 12px;
    display: none;
}

.cfp-form-messages.cfp-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.cfp-form-messages.cfp-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Field validation */
.cfp-field-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.cfp-error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Responsive design */
@media (max-width: 768px) {
    .cfp-contact-form-wrapper {
        margin: 0 10px;
        padding: 15px;
    }
    
    .cfp-form-title {
        font-size: 20px;
    }
    
    .cfp-input,
    .cfp-textarea,
    .cfp-select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .cfp-submit-btn {
        width: 100%;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .cfp-contact-form-wrapper {
        margin: 0;
        border-radius: 0;
    }
    
    .cfp-form-group {
        margin-bottom: 15px;
    }
}

/* Custom fields styling */
.cfp-custom-field {
    position: relative;
}

/* Accessibility improvements */
.cfp-input:focus,
.cfp-textarea:focus,
.cfp-select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cfp-input,
    .cfp-textarea,
    .cfp-select {
        border-width: 3px;
    }
    
    .cfp-submit-btn {
        border: 2px solid #fff;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .cfp-input,
    .cfp-textarea,
    .cfp-select,
    .cfp-submit-btn {
        transition: none;
    }
    
    .cfp-spinner {
        animation: none;
    }
}