:root {
    --mb-modal-title-color: #333;
    --mb-modal-btn-close-size: 30px;
}
.simple-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    display: flex;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.simple-modal--active {
    opacity: 1;
    visibility: visible;
    z-index: 1001;
}

.simple-modal--active ~ .simple-modal--active {
    z-index: 1002; /* Для вложенных модалок */
}

.simple-modal__content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    position: relative;
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: auto;
}

.simple-modal--active .simple-modal__content {
    transform: translateY(0);
}

.simple-modal__close {
    display: inline-flex;
    align-items: center;
    align-content: center;
    position: sticky;
    top: 0;
    left: 100%;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    width: var(--mb-modal-btn-close-size);
    height: var(--mb-modal-btn-close-size);
}

.simple-modal__close svg {
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease;
}

.simple-modal__close:hover svg {
    transform: rotate(90deg);
}

.simple-modal__title {
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--mb-modal-title-color);
    width: calc(100% - var(--mb-modal-btn-close-size) - 5px);
}
.simple-modal__title h2 {
    margin-bottom: 0;
}

.simple-modal__body {
    color: #666;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .simple-modal__content {
        height: 90%;
        padding: 20px;
    }
}
