/* Contact Form Modal Styles */
.contact-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.contact-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.contact-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.contact-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.contact-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.contact-modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--action-primary);
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--trust-primary);
    box-shadow: 0 0 0 3px var(--trust-light);
}

.form-input.error,
.form-textarea.error {
    border-color: var(--action-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-error {
    color: var(--action-primary);
    font-size: 12px;
    margin-top: 4px;
}

/* Honeypot field - hidden from users */
.form-group.honeypot {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.form-submit {
    flex: 1;
    padding: 12px 24px;
    background: var(--trust-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.form-submit:hover:not(:disabled) {
    background: #1e40af;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--trust-light);
}

.form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-cancel {
    padding: 12px 24px;
    background: var(--bg-hover);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.form-cancel:hover {
    background: var(--border-color);
}

.form-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.success-message {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-submessage {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Loading state */
.form-loading {
    position: relative;
}

.form-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--trust-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Dark mode adjustments */
[data-theme="dark"] .contact-modal {
    background: var(--bg-card);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .contact-modal {
        width: 95%;
        padding: 24px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .contact-modal-title {
        font-size: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-cancel {
        order: 2;
    }
}