/**
 * Contact Modal Styles
 * Modern popup form with smooth animations
 */

/* Modal Container */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

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

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

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

/* Close Button */
.contact-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: #F3F4F6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6B7280;
    font-size: 18px;
    z-index: 2;
}

.contact-modal-close:hover {
    background: #E5E7EB;
    color: #1F2937;
    transform: rotate(90deg);
}

/* Modal Header */
.contact-modal-header {
    margin-bottom: 32px;
    padding-right: 40px;
}

.contact-modal-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary, #0F172A);
    margin-bottom: 8px;
    line-height: 1.2;
}

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

/* Form Styles */
.contact-modal .contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.contact-modal .form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.contact-modal .form-group input,
.contact-modal .form-group select,
.contact-modal .form-group textarea {
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #FFFFFF;
}

.contact-modal .form-group input:focus,
.contact-modal .form-group select:focus,
.contact-modal .form-group textarea:focus {
    outline: none;
    border-color: var(--brand-primary, #1F3A8A);
    box-shadow: 0 0 0 4px rgba(31, 58, 138, 0.1);
}

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

.contact-modal .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='%236B7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}

/* Consent Checkbox */
.contact-modal .form-consent {
    margin-top: 8px;
}

.contact-modal .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.contact-modal .checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--brand-primary, #1F3A8A);
}

.contact-modal .checkbox-label span {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
}

.contact-modal .checkbox-label a {
    color: var(--accent-default, #2563EB);
    text-decoration: underline;
}

/* Submit Button */
.contact-modal .btn-large {
    width: 100%;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.contact-modal .btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Message */
.contact-modal .form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

.contact-modal .form-message.success {
    display: block;
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #10B981;
}

.contact-modal .form-message.error {
    display: block;
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #EF4444;
}

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

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

/* Scrollbar Styles */
.contact-modal-content::-webkit-scrollbar {
    width: 8px;
}

.contact-modal-content::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 8px;
}

.contact-modal-content::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 8px;
}

.contact-modal-content::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-modal-content {
        width: 95%;
        max-height: 95vh;
        padding: 32px 24px;
        border-radius: 12px;
    }

    .contact-modal-header h2 {
        font-size: 26px;
    }

    .contact-modal-header p {
        font-size: 15px;
    }

    .contact-modal .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-modal-close {
        top: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .contact-modal-content {
        padding: 24px 20px;
    }

    .contact-modal-header {
        margin-bottom: 24px;
        padding-right: 32px;
    }

    .contact-modal-header h2 {
        font-size: 24px;
    }

    .contact-modal .form-group input,
    .contact-modal .form-group select,
    .contact-modal .form-group textarea {
        padding: 10px 14px;
        font-size: 14px;
    }
}

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