/* Inquiry Form Frontend Styles */

.inquiry-form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.inquiry-form {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
}

.inquiry-form:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 2rem 1.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.1;
}

.form-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.form-icon {
    width: 2rem;
    height: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.form-description {
    margin: 0;
    font-size: 1rem;
    opacity: 0.95;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.form-fields {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.field-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #6366f1;
    flex-shrink: 0;
}

.required {
    color: #ef4444;
    font-weight: 700;
    margin-left: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-input:hover {
    border-color: #d1d5db;
}

.form-input:invalid {
    border-color: #ef4444;
}

.form-input:valid {
    border-color: #10b981;
}

.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.form-actions {
    padding: 0 2rem 2rem 2rem;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.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;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(2px);
}

.form-messages {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.form-messages.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
    color: #065f46;
}

.form-messages.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
    color: #991b1b;
}

.form-messages ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.form-messages li {
    margin-bottom: 0.25rem;
}

.form-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
    color: #6b7280;
}

.loading-spinner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.loading-spinner svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #6366f1;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Math CAPTCHA Styles */
.math-captcha-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.math-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    text-align: center;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.math-question strong {
    color: #6366f1;
    font-size: 1.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.math-captcha-input {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100px !important;
    margin: 0 auto;
    display: block;
}

.math-captcha-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: scale(1.05);
}

/* Enhanced CAPTCHA section */
.form-group:has(.math-captcha-container) {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group:has(.g-recaptcha) {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* reCAPTCHA container styling */
.g-recaptcha {
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive design for CAPTCHA */
@media (max-width: 480px) {
    .math-captcha-container {
        padding: 0.75rem;
    }
    
    .math-question {
        font-size: 1rem;
        padding: 0.5rem;
    }
    
    .math-question strong {
        font-size: 1.1rem;
    }
    
    .math-captcha-input {
        width: 80px !important;
        font-size: 1rem;
    }
}

/* Dark mode support for CAPTCHA */
@media (prefers-color-scheme: dark) {
    .math-captcha-container {
        background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
        border-color: #4b5563;
    }
    
    .math-question {
        background: #4b5563;
        border-color: #6b7280;
        color: #f9fafb;
    }
    
    .math-question strong {
        color: #a78bfa;
    }
    
    .form-group:has(.math-captcha-container) {
        background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
        border-color: #374151;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .inquiry-form-container {
        margin: 1rem;
        max-width: none;
    }
    
    .form-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-fields {
        padding: 1.5rem;
    }
    
    .form-actions {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }
    
    .form-input {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .form-header {
        padding: 1rem;
    }
    
    .form-fields {
        padding: 1rem;
    }
    
    .form-actions {
        padding: 0 1rem 1rem 1rem;
    }
    
    .form-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Animation for form appearance */
.inquiry-form-container {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.submit-btn:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.form-input:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .inquiry-form {
        border: 2px solid #000;
    }
    
    .form-input {
        border: 2px solid #000;
    }
    
    .submit-btn {
        background: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .inquiry-form,
    .form-input,
    .submit-btn,
    .btn-icon {
        transition: none;
    }
    
    .animate-spin {
        animation: none;
    }
    
    .inquiry-form-container {
        animation: none;
    }
}

/* Print styles */
@media print {
    .inquiry-form-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .form-header {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
    
    .submit-btn {
        display: none;
    }
}
