/* ===================================
   CONTACT MODAL STYLES
   =================================== */

/* Modal Container */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Modal Overlay */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

/* Modal Content */
.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    z-index: 10000;
}

/* Modal Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.modal-close i {
    font-size: 20px;
    color: #333;
}

/* Modal Header */
.modal-header {
    padding: 40px 40px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.modal-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Modal Body */
.modal-body {
    padding: 30px 40px;
}

/* Form Styles */
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #9585F5;
    font-size: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9585F5;
    background: white;
    box-shadow: 0 0 0 4px rgba(149, 133, 245, 0.1);
}

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

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 10px;
}

.form-actions .btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-actions .btn-outline {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.form-actions .btn-outline:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Form Messages */
.form-message {
    text-align: center;
    padding: 40px 20px;
    border-radius: 15px;
    animation: fadeIn 0.3s ease;
}

.form-message i {
    font-size: 60px;
    margin-bottom: 20px;
}

.form-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: 700;
}

.form-message p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.form-message.success {
    background: #e8f5e9;
}

.form-message.success i {
    color: #4caf50;
}

.form-message.success h3 {
    color: #2e7d32;
}

.form-message.error {
    background: #ffebee;
}

.form-message.error i {
    color: #f44336;
}

.form-message.error h3 {
    color: #c62828;
}

/* Modal Footer */
.modal-footer {
    padding: 20px 40px 30px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 0 0 20px 20px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
}

.contact-item i {
    color: #9585F5;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.contact-item a {
    color: #9585F5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #7a68d4;
    text-decoration: underline;
}

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

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 30px 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 24px;
    }
    
    .modal-header p {
        font-size: 14px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-footer {
        padding: 15px 20px 20px;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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