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

.modal.active {
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #5a5a5941;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 55vw;
    max-height: 90vh;
    min-height: 200px;
    overflow-y: auto;

    padding-top: 40px;
    padding-bottom: 40px;
    padding-left: 52px;
    padding-right: 52px;

    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease-in-out;
}

@media (max-width: 1024px) {
    .modal-content {
        max-width: 90vw;
        padding: 20px;
        max-height: 80vh;

    }
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}


.modal-close {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 3rem;
    height: 3rem;
    border: none;
    background: #F8F9FA;
    border-radius: 99px 33px 0 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #B4C1FF;
}

.modal-close:focus {
    outline: 2px solid #F8F9FA;
    outline-offset: 2px;
}

.modal-close svg {
    width: 14px;
    height: 14px;
    fill: #323154;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0.5rem;
    }
    
    /* .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    } */
/*     
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    } */
    
    .modal-title {
        font-size: 1.25rem;
        padding-right: 3rem;
    }
    
    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 2rem;
        height: 2rem;
    }
    
    .modal-close svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Animation for modal content */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

/* Focus styles for accessibility */
.modal:focus {
    outline: none;
}

.modal-content:focus {
    outline: none;
}

/* Custom scrollbar for modal content */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
} 