/* Единые стили оболочки модальных окон */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    padding: 12px;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    color: #333333;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;

    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;

    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    font-family: sans-serif;
    animation: fadeInModal 0.3s ease-out;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    color: #aaaaaa;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #ff4757;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}