/**
 * Optivoo Smart Contact Form Styles
 * Modern, mobile-first design with enhanced UX
 */

/* Main Form Container */
.optivoo-contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    position: relative;
    overflow: hidden;
}

.optivoo-contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.cf7-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.cf7-subtitle {
    font-size: 16px;
    color: #718096;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

/* Progress Bar */
.form-progress {
    margin-bottom: 30px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 14px;
    color: #4a5568;
    font-weight: 500;
}

/* Form Sections */
.form-section {
    display: flex;
    align-items: flex-start;
    margin-bottom: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.section-icon {
    font-size: 24px;
    margin-right: 16px;
    margin-top: 8px;
    flex-shrink: 0;
}

.cf7-field-group {
    flex: 1;
}

/* Form Fields */
.cf7-field {
    margin-bottom: 20px;
}

.cf7-field:last-child {
    margin-bottom: 0;
}

.cf7-field label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 15px;
    line-height: 1.4;
}

.format-hint {
    font-weight: 400;
    color: #718096;
    font-size: 13px;
    margin-left: 8px;
}

.optional {
    font-weight: 400;
    color: #a0aec0;
    font-size: 13px;
}

/* Input Styles */
.cf7-field input[type="text"],
.cf7-field input[type="tel"],
.cf7-field input[type="email"],
.cf7-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    color: #2d3748;
    line-height: 1.5;
}

.cf7-field input:focus,
.cf7-field textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

/* Field States */
.field-valid {
    border-color: #48bb78 !important;
    background-color: #f0fff4;
}

.field-invalid {
    border-color: #f56565 !important;
    background-color: #fff5f5;
}

/* Field Help Text */
.field-help {
    margin-top: 6px;
    font-size: 13px;
    color: #718096;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.field-help.field-error {
    color: #e53e3e;
}

.help-icon {
    margin-right: 4px;
}

.char-counter {
    font-size: 12px;
    font-weight: 500;
}

/* Submit Section */
.form-submit {
    margin-top: 32px;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    min-width: 240px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.submit-help {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 13px;
    color: #718096;
}

.security-badge,
.response-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Success/Error Messages */
.wpcf7-response-output {
    margin-top: 20px;
    padding: 0;
    border: none;
    background: none;
}

.success-animation,
.error-animation {
    text-align: center;
    padding: 24px;
    border-radius: 12px;
    animation: slideIn 0.5s ease;
}

.success-animation {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border: 2px solid #48bb78;
}

.error-animation {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #f56565;
}

.success-icon,
.error-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.success-title,
.error-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.success-title {
    color: #22543d;
}

.error-title {
    color: #c53030;
}

.success-subtitle,
.error-subtitle {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
    line-height: 1.5;
}

.success-action,
.error-action {
    font-size: 13px;
    font-weight: 500;
}

.success-action {
    color: #22543d;
}

.error-action {
    color: #c53030;
}

.error-action a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.error-action a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-success {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .optivoo-contact-form {
        margin: 10px;
        padding: 16px;
        border-radius: 12px;
    }
    
    .form-section {
        flex-direction: column;
        padding: 20px;
    }
    
    .section-icon {
        margin-right: 0;
        margin-bottom: 12px;
        text-align: center;
        width: 100%;
    }
    
    .cf7-title {
        font-size: 24px;
    }
    
    .cf7-subtitle {
        font-size: 15px;
    }
    
    .cf7-field input,
    .cf7-field textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 14px 16px;
    }
    
    .btn-primary {
        width: 100%;
        padding: 18px 24px;
        font-size: 16px;
    }
    
    .submit-help {
        flex-direction: column;
        gap: 8px;
    }
    
    .field-help {
        font-size: 12px;
    }
    
    .success-animation,
    .error-animation {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .optivoo-contact-form {
        margin: 5px;
        padding: 12px;
    }
    
    .form-section {
        padding: 16px;
        margin-bottom: 20px;
    }
    
    .cf7-field {
        margin-bottom: 16px;
    }
    
    .cf7-title {
        font-size: 22px;
    }
    
    .section-icon {
        font-size: 20px;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .optivoo-contact-form {
        border-width: 0.5px;
    }
    
    .cf7-field input,
    .cf7-field textarea {
        border-width: 1px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .optivoo-contact-form {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        color: #e2e8f0;
    }
    
    .cf7-title {
        color: #f7fafc;
    }
    
    .cf7-subtitle {
        color: #a0aec0;
    }
    
    .form-section {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .cf7-field input,
    .cf7-field textarea {
        background: #4a5568;
        border-color: #718096;
        color: #f7fafc;
    }
    
    .cf7-field label {
        color: #e2e8f0;
    }
    
    .field-help {
        color: #a0aec0;
    }
}
