/* Close With Faez Forms Styling */

/* Form Container */
.cwf-form {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    padding: 4rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.cwf-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

/* Form Groups */
.cwf-form .form-group {
    margin-bottom: 2rem;
    position: relative;
}

.cwf-form .form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.cwf-form .form-group.focused label {
    color: #ffffff;
}

/* Form Inputs */
.cwf-form input,
.cwf-form textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
}

.cwf-form input:focus,
.cwf-form textarea:focus {
    outline: none;
    border-color: #fbbf24;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
}

.cwf-form input:hover,
.cwf-form textarea:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

/* Textarea specific styling */
.cwf-form textarea {
    min-height: 140px;
    line-height: 1.6;
}

/* Submit Button */
.cwf-form .submit-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000000;
    padding: 20px 50px;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.cwf-form .submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cwf-form .submit-btn:hover::before {
    left: 100%;
}

.cwf-form .submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.4);
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.cwf-form .submit-btn:active {
    transform: translateY(-1px);
}

.cwf-form .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.cwf-form .success-message {
    display: none;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
    font-weight: 500;
    animation: fadeInUp 0.5s ease-out;
}

.cwf-form .success-message i {
    margin-right: 0.5rem;
    font-size: 1.2em;
}

/* Error Styling */
.cwf-form input.error,
.cwf-form textarea.error {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.cwf-form .field-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease-out;
}

/* Character Counter */
.cwf-form .char-counter {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

.cwf-form .char-counter.warning {
    color: #f59e0b;
}

.cwf-form .char-counter.error {
    color: #ef4444;
}

/* Placeholder Styling */
.cwf-form input::placeholder,
.cwf-form textarea::placeholder {
    color: rgba(156, 163, 175, 0.7);
    transition: color 0.3s ease;
}

.cwf-form input:focus::placeholder,
.cwf-form textarea:focus::placeholder {
    color: rgba(156, 163, 175, 0.5);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading State */
.cwf-form .submit-btn.loading {
    position: relative;
    color: transparent;
}

.cwf-form .submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .cwf-form {
        padding: 2.5rem;
        margin: 0 1rem;
    }
    
    .cwf-form input,
    .cwf-form textarea {
        padding: 15px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .cwf-form .submit-btn {
        padding: 18px 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .cwf-form {
        padding: 2rem;
    }
    
    .cwf-form .submit-btn {
        padding: 16px 30px;
        font-size: 1rem;
    }
}

/* Focus Visible for Accessibility */
.cwf-form input:focus-visible,
.cwf-form textarea:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cwf-form input,
    .cwf-form textarea {
        border-width: 3px;
    }
    
    .cwf-form .submit-btn {
        border: 2px solid #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cwf-form input,
    .cwf-form textarea,
    .cwf-form .submit-btn,
    .cwf-form .success-message {
        transition: none;
    }
    
    .cwf-form .submit-btn:hover {
        transform: none;
    }
}
