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

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

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--color-light);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 10001;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--color-gray);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--color-dark);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

[dir="rtl"] .modal-close {
    right: auto;
    left: 1rem;
}

.modal-close:hover {
    background: var(--color-primary);
    color: var(--color-light);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header i {
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
}

.modal-header h2 {
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--color-text);
    opacity: 0.8;
}

/* Form Styles */
.interest-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.form-group .required {
    color: #e74c3c;
}

.form-group .optional {
    font-size: 0.85rem;
    font-weight: 400;
    color: #7f8c8d;
}

.form-group input,
.form-group select {
    padding: 0.8rem 1rem;
    border: 2px solid var(--color-gray);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.form-group select {
    cursor: pointer;
    background: var(--color-light);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.form-actions button {
    flex: 1;
}

/* Success Message */
.modal-success {
    text-align: center;
    padding: 2rem 0;
}

.modal-success i {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.modal-success h3 {
    color: var(--color-primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-success p {
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.modal-success button {
    min-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
}

/* Loading State */
.interest-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.interest-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
