/* 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: #00044180;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

    padding-top: 20px;
    padding-bottom: 54px;
    padding-left: 40px;
    padding-right: 40px;

    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 14px 33px -19px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 90vw;
        padding: 10px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

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

/* .modal-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
} */

.modal-title {
    color: #000441;
    font-family: "gamay", sans-serif;
    font-size: 32px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-bottom: 16px;
}

.modal-body {
    /* padding: 0 1.5rem 1.5rem 1.5rem; */
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.modal-close {
    position: sticky;
    top: 0px;
    margin-left: auto;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: #000781;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #3B3D78;
}

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

.modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: #6b7280;
}

/* 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;
} 