/* ==========================================================================
   TIDYCAL MODAL — Boost Abruzzo
   Подключается только на странице diventa-mentor
   ========================================================================== */

/* Блокировка скролла страницы когда модалка открыта */
body.boost-modal-open {
    overflow: hidden;
}

/* Overlay */
#boost-tidycal-modal {
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: boostModalFadeIn 0.25s ease;
}

@keyframes boostModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Окно */
.boost-tidycal-modal__box {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    overflow: hidden;
    padding: 40px 0 0 0;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
    animation: boostModalSlideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes boostModalSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Кнопка закрытия */
.boost-tidycal-modal__close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #554596;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 2;
    transition: color 0.2s;
}

.boost-tidycal-modal__close:hover {
    color: #EA5B0C;
}

/* Лоадер */
.boost-tidycal-modal__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.boost-tidycal-modal__loader span {
    display: block;
    width: 40px;
    height: 40px;
    border: 3px solid #e0e0e0;
    border-top-color: #554596;
    border-radius: 50%;
    animation: boostSpin 0.8s linear infinite;
}

@keyframes boostSpin {
    to { transform: rotate(360deg); }
}

/* iframe — занимает всё окно */
.boost-tidycal-modal__iframe {
    display: block;
    width: 100%;
    flex: 1;
    min-height: 620px;
    border: none;
    background: transparent;
}

/* Мобайл */
@media (max-width: 600px) {
    #boost-tidycal-modal {
        padding: 10px;
        align-items: flex-end;
    }

    .boost-tidycal-modal__box {
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }

    .boost-tidycal-modal__iframe {
        min-height: 500px;
    }
}
