.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}


.modal-dialog {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e8e8e8;
    flex-shrink: 0;
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #252A2D;
    margin: 0;
    line-height: 1.3;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    color: #252A2D;
    line-height: 1.7;
    margin: 0;
}

.modal-body a {
    color: #D50057;
    font-weight: 600;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.modal-body a:hover {
    opacity: 0.75;
}

/* Footer */
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.modal-btn-close {
    font-family: 'Montserrat', sans-serif;
    background: #D50057;
    color: #ffffff;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.modal-btn-close:hover {
    background: #b8004b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(213, 0, 87, 0.3);
}

.modal-btn-close:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .modal-dialog {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 80vh;
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 14px 20px;
    }

    .modal-btn-close {
        width: 100%;
    }
}