/**
 * WP Contact Flex - Frontend Styles
 * Version: 1.0.0
 */

.wp-contact-flex-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wp-contact-flex-form {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Form Title - Removed */

.wp-contact-flex-field {
    margin-bottom: 25px;
    position: relative;
}

.wp-contact-flex-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.wp-contact-flex-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.wp-contact-flex-field .required {
    color: #e74c3c;
}

.wp-contact-flex-field input[type="text"],
.wp-contact-flex-field input[type="email"],
.wp-contact-flex-field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    background-color: #fafbfc;
}

.wp-contact-flex-input,
.wp-contact-flex-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fafbfc;
}

.wp-contact-flex-field input[type="text"]:focus,
.wp-contact-flex-field input[type="email"]:focus,
.wp-contact-flex-field textarea:focus,
.wp-contact-flex-input:focus,
.wp-contact-flex-textarea:focus {
    outline: none;
    border-color: #3498db;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.wp-contact-flex-field textarea {
    resize: vertical;
    min-height: 120px;
}

.wp-contact-flex-subjects .wp-contact-flex-checkbox-group {
    margin-top: 8px;
}

.wp-contact-flex-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    background: #ffffff;
    color: #495057;
    line-height: 1.5;
}

/* GDPR Consent Styling */
.wp-contact-flex-gdpr {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    border-left: 4px solid #3498db;
}

.wp-contact-flex-checkbox-label:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.wp-contact-flex-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px;
    accent-color: #3498db;
    flex-shrink: 0;
}

.wp-contact-flex-checkbox-label input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #2c3e50;
}

.wp-contact-flex-checkbox-label:has(input[type="checkbox"]:checked) {
    border-color: #3498db;
    background: #e3f2fd;
}

.wp-contact-flex-checkbox-label span {
    font-size: 14px;
    line-height: 1.4;
}

.wp-contact-flex-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.wp-contact-flex-submit {
    margin-top: 25px;
    text-align: left;
}

.wp-contact-flex-button {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.submit-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.wp-contact-flex-button:hover,
.submit-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.wp-contact-flex-button:active,
.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.wp-contact-flex-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.wp-contact-flex-message {
    margin: 20px auto;
    padding: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    max-width: 500px;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
}

.wp-contact-flex-message.success {
    background: #ffffff;
    color: #28a745;
    border: 2px solid #28a745;
}

.wp-contact-flex-success {
    background: #ffffff;
    color: #28a745;
    border: 2px solid #28a745;
    padding: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    max-width: 500px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wp-contact-flex-message.error {
    background: #ffffff;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.wp-contact-flex-error-message {
    background: #ffffff;
    color: #dc3545;
    border: 2px solid #dc3545;
    padding: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    max-width: 500px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.wp-contact-flex-bible-verse {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fab1a0 100%);
    border-radius: 6px;
    font-style: italic;
    color: #2d3436;
    border-left: 4px solid #fdcb6e;
    font-size: 14px;
    line-height: 1.5;
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    padding: 8px 12px;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-weight: 500;
}

.wp-contact-flex-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 8px;
    display: none;
    padding: 8px 12px;
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    font-weight: 500;
}

.wp-contact-flex-loading {
    position: relative;
}

.wp-contact-flex-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: wp-contact-flex-spin 1s linear infinite;
}

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

/* Loading State */
.wp-contact-flex-form.loading .wp-contact-flex-button,
.wp-contact-flex-form.loading .submit-btn {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.wp-contact-flex-form.loading .wp-contact-flex-button::after,
.wp-contact-flex-form.loading .submit-btn::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Input Validation States */
.wp-contact-flex-input.error,
.wp-contact-flex-textarea.error,
input.error,
textarea.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.wp-contact-flex-input.success,
.wp-contact-flex-textarea.success,
input.success,
textarea.success {
    border-color: #27ae60;
    background-color: #f0f9f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-contact-flex-wrapper {
        padding: 15px;
    }
    
    .wp-contact-flex-form {
        padding: 20px 15px;
        border-radius: 8px;
    }
    

    
    .wp-contact-flex-field input[type="text"],
    .wp-contact-flex-field input[type="email"],
    .wp-contact-flex-field textarea,
    .wp-contact-flex-input,
    .wp-contact-flex-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 14px;
    }
    
    .wp-contact-flex-button,
    .submit-btn {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .wp-contact-flex-gdpr {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .wp-contact-flex-wrapper {
        padding: 10px;
    }
    
    .wp-contact-flex-form {
        padding: 15px;
    }
    
    .wp-contact-flex-button {
        width: 100%;
        padding: 16px;
    }
}

/* Accessibility improvements */
.wp-contact-flex-field input:invalid {
    border-color: #e74c3c;
}

.wp-contact-flex-field input:valid {
    border-color: #27ae60;
}

/* Focus visible for better keyboard navigation */
.wp-contact-flex-button:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wp-contact-flex-form {
        border: 2px solid #000000;
    }
    
    .wp-contact-flex-field input[type="text"],
    .wp-contact-flex-field input[type="email"],
    .wp-contact-flex-field textarea {
        border: 2px solid #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wp-contact-flex-button,
    .wp-contact-flex-field input[type="text"],
    .wp-contact-flex-field input[type="email"],
    .wp-contact-flex-field textarea {
        transition: none;
    }
    
    @keyframes wp-contact-flex-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}