/* Калькулятор сроков обучения (sroki_calc).
   Самодостаточные стили со скоупом под .ast-sroki-calc — не зависят от
   обёртки body--pplisting листинга и не пересекаются со стилями сайта
   (в т.ч. глобальным .btn шаблона aspro — кнопка блока называется .sroki-btn).
   Источник вёрстки: ast-listing (pplisting.scss + blocks/_timeline.scss),
   брейкпоинты: lg = 992px, xl = 1200px. */

.ast-sroki-calc {
    /* Рамочные классы секции (в вёрстке скоупятся под body--pplisting — здесь своя копия) */
}

.ast-sroki-calc .sroki-inner {
    max-width: 899px;
    margin-inline: auto;
}

.ast-sroki-calc .section {
    padding-block: 64px;
}

.ast-sroki-calc .section__top {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
    align-self: stretch;
    margin-bottom: 32px;
}

.ast-sroki-calc .section__head {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
    align-self: stretch;
    overflow: hidden;
}

.ast-sroki-calc .section__head-top {
    display: inline-flex;
    justify-content: space-between;
    align-items: flex-end;
    align-self: stretch;
    overflow: hidden;
}

.ast-sroki-calc .section__title {
    max-width: 553px;
    color: #000733;
    font-size: 30px;
    font-weight: 700;
    line-height: 33px;
    margin: 0;
}

.ast-sroki-calc .section__text {
    max-width: 553px;
    color: #000000;
    font-size: 16px;
    font-weight: 400;
    line-height: 22.4px;
    margin: 0;
}

.ast-sroki-calc .label-blue {
    display: inline-flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 16px;
    background: #E2EAFF;
    border-radius: 20px;
    overflow: hidden;
}

.ast-sroki-calc .label-blue__dot {
    width: 6px;
    height: 6px;
    background: #0028B1;
    border-radius: 9999px;
    align-self: center;
}

.ast-sroki-calc .label-blue__text {
    color: #0028B1;
    font-size: 16px;
    font-weight: 700;
    line-height: 17.6px;
}

/* Календарь */
.ast-sroki-calc .calendar-card {
    width: 100%;
    padding: 32px;
    background: white;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.10);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.ast-sroki-calc .calendar-card .card-title {
    color: #000733;
    font-size: 20px;
    font-weight: 700;
    line-height: 22px;
}

.ast-sroki-calc .calendar-card .input-row {
    display: flex;
    gap: 16px;
    width: 100%;
}

.ast-sroki-calc .calendar-card .date-input-container {
    flex: 2;
    height: 56px;
    padding: 15px 18px;
    background: white;
    border-radius: 12px;
    border: 1px solid #F0F3FF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000733;
    font-size: 16px;
    font-weight: 400;
    box-sizing: border-box;
}

.ast-sroki-calc .calendar-card .days-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000733;
    font-size: 16px;
    font-weight: 400;
    flex: 1.2;
    height: 56px;
    padding: 12px 14px;
    background: #F0F3FF;
    border-radius: 12px;
    box-sizing: border-box;
}

.ast-sroki-calc .calendar-card .calendar-wrapper {
    width: 100%;
    padding: 32px;
    background: white;
    border-radius: 20px;
    border: 1px solid #F0F3FF;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.ast-sroki-calc .calendar-card .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.ast-sroki-calc .calendar-card .calendar-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.ast-sroki-calc .calendar-card .today-btn {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    padding: 8px 16px;
    background: #E2EAFF;
    border-radius: 20px;
    color: #0028B1;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    cursor: pointer;
    transition: background 0.2s;
}

.ast-sroki-calc .calendar-card .today-btn:hover {
    background: #D7DFFF;
}

.ast-sroki-calc .calendar-card .current-month-year {
    color: #000733;
    font-size: 16px;
    font-weight: 700;
}

.ast-sroki-calc .calendar-card .nav-arrows {
    display: flex;
    gap: 8px;
}

.ast-sroki-calc .calendar-card .nav-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.ast-sroki-calc .calendar-card .nav-arrow:hover {
    background: #F0F3FF;
}

.ast-sroki-calc .calendar-card .nav-arrow[disabled] {
    opacity: 0.35;
    cursor: default;
}

.ast-sroki-calc .calendar-card .nav-arrow[disabled]:hover {
    background: transparent;
}

.ast-sroki-calc .calendar-card .weekdays-grid,
.ast-sroki-calc .calendar-card .days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
}

.ast-sroki-calc .calendar-card .weekdays-grid {
    color: #0028B1;
    font-size: 14px;
    font-weight: 400;
    height: 24px;
    align-items: center;
    margin: 0;
}

.ast-sroki-calc .calendar-card .days-grid {
    row-gap: 4px;
}

.ast-sroki-calc .calendar-card .day-cell {
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: #000733;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}

.ast-sroki-calc .calendar-card .day-cell:hover {
    background: #F0F3FF;
}

.ast-sroki-calc .calendar-card .day-cell.other-month {
    color: #b3b7cc;
}

.ast-sroki-calc .calendar-card .day-cell.selected {
    background: #0028B1;
    color: white !important;
    font-weight: 700;
}

/* Прошедшие даты недоступны для выбора */
.ast-sroki-calc .calendar-card .day-cell.disabled {
    color: #b3b7cc;
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

/* Максимальная продолжительность */
.ast-sroki-calc .timeline-bot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 24px;
    gap: 16px;
}

.ast-sroki-calc .duration-badge {
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 456px;
    padding: 32px;
    background: #07184B;
    border-radius: 20px;
    box-sizing: border-box;
}

.ast-sroki-calc .duration-badge__content {
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 8px;
    flex: 1 1 0;
    overflow: hidden;
}

.ast-sroki-calc .duration-badge__label {
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 400;
    line-height: 16.8px;
    opacity: 0.72;
    letter-spacing: 0.03em;
}

.ast-sroki-calc .duration-badge__title {
    color: #FFFFFF;
    font-size: 44px;
    font-weight: 700;
    line-height: 44px;
    margin: 0;
}

.ast-sroki-calc .duration-badge__description {
    align-self: stretch;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 400;
    line-height: 25.2px;
    margin: 0;
}

.ast-sroki-calc .duration-badge__status-pill {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 10px 16px 10px 14px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    overflow: hidden;
}

.ast-sroki-calc .duration-badge__icon-check {
    position: relative;
    width: 18px;
    height: 18px;
    overflow: hidden;
}

.ast-sroki-calc .duration-badge__icon-bg {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    border-radius: 16px;
    background: #DDE8FF;
}

.ast-sroki-calc .duration-badge__icon-checkmark {
    position: absolute;
    top: 6.4px;
    left: 5.5px;
    width: 7px;
    height: 4.8px;
    border-left: 1.8px solid #0031C8;
    border-bottom: 1.8px solid #0031C8;
    transform: rotate(-45deg);
    transform-origin: center;
}

.ast-sroki-calc .duration-badge__status-text {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    line-height: 19.6px;
}

/* Состояние «выбранного срока недостаточно» */
.ast-sroki-calc.is-empty .duration-badge__title,
.ast-sroki-calc.is-empty .duration-badge__status-pill {
    display: none;
}

/* Подбор программы */
.ast-sroki-calc .program-selector {
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 12px;
}

.ast-sroki-calc .program-selector__status-pill {
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 14px;
    background: #E7EEFF;
    border-radius: 999px;
    overflow: hidden;
}

.ast-sroki-calc .program-selector__icon-check {
    position: relative;
    width: 18px;
    height: 18px;
    overflow: hidden;
}

.ast-sroki-calc .program-selector__icon-bg {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 16px;
    background: #DDE8FF;
    border-radius: 16px;
}

.ast-sroki-calc .program-selector__icon-checkmark {
    position: absolute;
    top: 6.4px;
    left: 5.5px;
    width: 7px;
    height: 4.8px;
    box-sizing: border-box;
    border-left: 1.8px solid #0031C8;
    border-bottom: 1.8px solid #0031C8;
    transform: rotate(-45deg);
    transform-origin: center;
}

.ast-sroki-calc .program-selector__status-text {
    color: #0E43CB;
    font-size: 14px;
    font-weight: 500;
    line-height: 19.6px;
}

.ast-sroki-calc .program-selector__title {
    align-self: stretch;
    color: #07184B;
    font-size: 24px;
    font-weight: 700;
    line-height: 30px;
    margin: 0;
}

.ast-sroki-calc .program-selector__description {
    align-self: stretch;
    color: #07184B;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
    max-width: 360px;
}

.ast-sroki-calc .program-selector__footnote {
    align-self: stretch;
    opacity: 0.62;
    color: #07184B;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    max-width: 360px;
}

/* Кнопка заявки — копия btn--secondary btn--s из вёрстки
   (свой класс: глобальный .btn шаблона aspro вне листинга другой) */
.ast-sroki-calc .sroki-btn {
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    box-shadow: none;
    letter-spacing: 0;
    white-space: nowrap;
    max-width: 100%;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: max-content;
    padding: 15px 31px;
    background: #0028B1;
    border: 1px solid #0028B1;
    border-radius: 10px;
    cursor: pointer;
    color: #FFFFFF;
    font-family: inherit;
    font-weight: 400;
    font-size: 20px;
    line-height: 30px;
    word-wrap: break-word;
    transition: all 0.2s;
}

.ast-sroki-calc .sroki-btn:hover {
    color: #FFFFFF;
    background: #0338EE;
    border-color: #0338EE;
}

.ast-sroki-calc .sroki-btn img {
    flex: 0 0 auto;
}

/* Мобильная версия (lg = 992px в вёрстке) */
@media (max-width: 991.98px) {
    .ast-sroki-calc .section {
        padding-block: 45px;
    }

    .ast-sroki-calc .section__top {
        gap: 16px;
        margin-bottom: 40px;
    }

    .ast-sroki-calc .section__head {
        gap: 16px;
    }

    .ast-sroki-calc .section__title {
        font-size: 22px;
        line-height: 110%;
        letter-spacing: -0.02em;
        flex: auto;
        max-width: 295px;
    }

    .ast-sroki-calc .section__text {
        font-size: 14px;
        line-height: 140%;
    }

    .ast-sroki-calc .calendar-card {
        padding: 20px 16px;
    }

    .ast-sroki-calc .calendar-card .card-title {
        font-size: 14px;
        line-height: 135%;
    }

    .ast-sroki-calc .calendar-card .input-row {
        flex-direction: column;
        gap: 0;
    }

    .ast-sroki-calc .calendar-card .date-input-container {
        font-size: 14px;
        line-height: 135%;
        padding: 12px 13px;
        height: 44px;
    }

    .ast-sroki-calc .calendar-card .date-input-container svg {
        width: 16px;
        height: 16px;
    }

    .ast-sroki-calc .calendar-card .date-input-container svg path,
    .ast-sroki-calc .calendar-card .days-badge svg path {
        stroke: #6282B8;
    }

    .ast-sroki-calc .calendar-card .days-badge {
        font-size: 11px;
        line-height: 135%;
        padding-top: 20px;
        padding-bottom: 20px;
        background: transparent;
        border-radius: 0;
    }

    .ast-sroki-calc .calendar-card .days-badge svg {
        width: 16px;
        height: 16px;
    }

    .ast-sroki-calc .calendar-card .calendar-wrapper {
        padding: 12px 10px;
        border-radius: 14px;
        gap: 7px;
    }

    .ast-sroki-calc .calendar-card .current-month-year {
        font-size: 13px;
        line-height: 135%;
    }

    .ast-sroki-calc .calendar-card .today-btn {
        font-size: 11px;
        padding: 6px 12px;
    }

    .ast-sroki-calc .calendar-card .weekdays-grid {
        font-size: 9px;
        line-height: 135%;
        height: 18px;
    }

    .ast-sroki-calc .calendar-card .days-grid {
        row-gap: 7px;
    }

    .ast-sroki-calc .calendar-card .day-cell {
        height: 26px;
        font-size: 10px;
        line-height: 135%;
    }

    .ast-sroki-calc .timeline-bot {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .ast-sroki-calc .duration-badge {
        padding: 20px;
        border-radius: 24px;
        max-width: 100%;
    }

    .ast-sroki-calc .duration-badge__content {
        gap: 12px;
    }

    .ast-sroki-calc .duration-badge__title {
        font-size: 22px;
        line-height: 110%;
    }

    .ast-sroki-calc .duration-badge__description {
        font-size: 14px;
        line-height: 140%;
    }

    .ast-sroki-calc .duration-badge__status-pill {
        gap: 8px;
        padding: 8px 12px;
    }

    .ast-sroki-calc .duration-badge__icon-check {
        width: 16px;
        height: 16px;
    }

    .ast-sroki-calc .duration-badge__icon-bg {
        background: transparent;
    }

    .ast-sroki-calc .duration-badge__icon-checkmark {
        border-left-color: #fff;
        border-bottom-color: #fff;
        top: 5px;
    }

    .ast-sroki-calc .duration-badge__status-text {
        font-size: 12px;
        line-height: 140%;
    }

    .ast-sroki-calc .program-selector {
        padding-top: 0;
        gap: 16px;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .ast-sroki-calc .program-selector__status-pill,
    .ast-sroki-calc .program-selector__icon-check,
    .ast-sroki-calc .program-selector__title,
    .ast-sroki-calc .program-selector__description {
        display: none;
    }

    .ast-sroki-calc .program-selector__footnote {
        text-align: center;
        margin-inline: auto;
    }

    .ast-sroki-calc .sroki-btn {
        width: 100%;
        padding: 16px;
        font-size: 16px;
        line-height: 22.4px;
    }
}
