/**
 * Contact Form Popup Styles
 * Popup form for course enrollment and messaging
 */

.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.contact-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.contact-close:hover {
    background: #f0f0f0;
    color: #333;
}

.contact-header {
    padding: 2rem 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.contact-title {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.contact-subtitle {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.95;
}

.contact-content {
    padding: 2rem;
}

.contact-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-message-success {
    background: #d1f2eb;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.contact-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.contact-message i {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.contact-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.contact-input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--primary-color);
    pointer-events: none;
}

.contact-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.contact-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #f0f9ff;
}

.contact-textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.contact-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.contact-btn-primary:active {
    transform: translateY(0);
}

.contact-btn-secondary {
    background: #f3f4f6;
    color: #333;
    border: 1px solid #ddd;
    text-decoration: none;
    display: inline-flex;
}

.contact-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #999;
}

.contact-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 640px) {
    .contact-modal {
        margin: 1rem;
        border-radius: 12px;
    }
    
    .contact-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .contact-title {
        font-size: 1.5rem;
    }
    
    .contact-content {
        padding: 1.5rem;
    }
    
    .contact-input-wrapper i {
        left: 0.75rem;
    }
    
    .contact-input {
        padding: 0.75rem 0.75rem 0.75rem 2.25rem;
    }
}

/* Accessibility */
.contact-input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.contact-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print */
@media print {
    .contact-overlay {
        display: none !important;
    }
}
