/* Tariff cards (white card: icon + name, wave, facts, options, pill button). Used by /private/wellcombo/ and
   /private/socialnye-tarify/; the other /private/ pages use the quieter "lite" variant at the end of this file */

.tariff-page .vk-grid {
    margin-top: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

@media screen and (max-width: 1365px) {
    .tariff-page .vk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 767px) {
    .tariff-page .vk-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

.tariff-card.vk-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 28px 24px 24px;
    background: #fff;
    border: 1px solid #e6edf3;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(20, 60, 110, .08);
    color: #14233c;
    user-select: auto;
    transition: transform .25s, box-shadow .25s;
}

.tariff-card.vk-card:hover {
    cursor: default;
    transform: none;
}

@media (hover: hover) {
    .tariff-card.vk-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 40px rgba(20, 60, 110, .14);
    }
}

/* head: icon + name */
.vk-card__head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 64px;
}

.vk-card__icon {
    flex: none;
    width: 46px;
    height: 46px;
}

.vk-card__icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.vk-card__name {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-weight: 700;
    line-height: 1.05;
    color: #14233c;
}

.vk-card__brand {
    margin-bottom: 4px;
    font-size: 13px;
    letter-spacing: .12em;
    color: #7a8aa0;
}

.vk-card__plan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 32px;
    white-space: nowrap;
}

.vk-card__plan .ui-hint {
    position: relative;
    top: -.09em; /* the flex line centre sits below the cap/digit centre by about .09em */
    display: inline-flex;
    align-items: center;
    height: auto;
    font-size: inherit;
    line-height: 1;
}

/* ui.hint gives the icon margin-top: 7px for body text; next to the big name it has to sit on the digits' centre */
.vk-card__plan .ui-hint-icon {
    margin-top: 0;
}

.vk-card__wave {
    height: 18px;
    margin: 14px -4px 18px;
    background: url(vk-wave.svg) center / 100% 100% no-repeat;
}

/* daily billing | speed */
.vk-card__facts {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: 14px;
    margin-bottom: 18px;
}

.vk-card__fact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.25;
    color: #3b4a5e;
}

.vk-card__fact svg {
    flex: none;
    width: 24px;
    height: 24px;
}

.vk-card__divider {
    flex: none;
    width: 1px;
    align-self: stretch;
    background: #dfe6ee;
}

.vk-card__speed {
    white-space: nowrap;
    color: #14233c;
}

.vk-card__speed b {
    font-size: 22px;
    font-weight: 700;
}

/* options */
.vk-card__options {
    margin-bottom: 22px;
    padding: 12px 14px;
    background: #f3f6f9;
    border-radius: 14px;
}

.tariff-card.vk-card .vk-card__option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.vk-card__check {
    flex: none;
    width: 20px;
    height: 20px;
}

.vk-card__check label {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
}

.vk-card__check label::before {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    background-color: #fff;
    border: 1.5px solid #c5ccd6;
    border-radius: 5px;
}

.vk-card__check input:checked + label::before {
    background: #00a2de url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
    border-color: #00a2de;
}

.tariff-card.vk-card .vk-card__option-name {
    font-size: 14px;
    line-height: 1.3;
    color: #3b4a5e;
}

.vk-card__option .tariff-card__hint {
    position: static;
    margin-left: -4px;
}

/* the tooltip spans the options panel, so it never sticks out of the card */
.vk-card__option .tariff-card__hint::before {
    left: -14px;
    right: -14px;
    width: auto;
    margin-bottom: 18px;
    transform: none;
}

.vk-card__option-price {
    margin-left: auto;
    font-size: 14px;
    white-space: nowrap;
    color: #14233c;
}

/* compact cards for 4 columns on narrower desktops (Вэллкомбо grid only) */
@media screen and (min-width: 1366px) and (max-width: 1500px) {
    .tariff-page .vk-grid {
        gap: 20px;
    }

    .vk-grid .tariff-card.vk-card {
        padding: 24px 20px 20px;
    }

    .vk-grid .vk-card__icon {
        width: 40px;
        height: 40px;
    }

    .vk-grid .vk-card__head {
        gap: 12px;
    }

    .vk-grid .vk-card__plan {
        font-size: 28px;
    }

    .vk-grid .vk-card__facts {
        gap: 10px;
    }

    .vk-grid .vk-card__fact {
        gap: 6px;
        font-size: 12px;
    }

    .vk-grid .vk-card__fact svg {
        width: 22px;
        height: 22px;
    }

    .vk-grid .vk-card__speed b {
        font-size: 20px;
    }

    .vk-grid .vk-card__options {
        padding: 12px;
    }

    .vk-grid .vk-card__btn {
        font-size: 15px;
    }
}

/* button */
.vk-card__btn {
    width: 100%;
    height: 52px;
    margin-top: auto;
    border: 0;
    border-radius: 26px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    white-space: nowrap;
    cursor: pointer;
}

/* small phones */
@media screen and (max-width: 400px) {
    .tariff-card.vk-card {
        padding: 24px 16px 18px;
    }

    .vk-card__icon {
        width: 36px;
        height: 36px;
    }

    .vk-card__head {
        gap: 10px;
    }

    .vk-card__plan {
        font-size: 26px;
    }

    .vk-card__facts {
        gap: 8px;
    }

    .vk-card__fact {
        gap: 6px;
        font-size: 12px;
    }

    .vk-card__fact svg {
        width: 22px;
        height: 22px;
    }

    .vk-card__speed b {
        font-size: 18px;
    }

    .vk-card__options {
        padding: 12px;
    }

    .vk-card__btn {
        font-size: 15px;
    }
}

@media screen and (max-width: 359px) {
    .vk-card__facts {
        flex-direction: column;
        align-items: center;
    }

    .vk-card__divider {
        display: none;
    }
}

/* BX.UI.Hint popup ("?" next to the tariff name), styled like the site's own tooltips ([data-tooltip]):
   white card, 20px radius, soft shadow, Helvetica, roomy line height */
.popup-window.ui-hint-popup.popup-window-dark {
    padding: 0;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 67px rgba(0, 0, 0, .11);
}

.ui-hint-popup.popup-window-dark .popup-window-content {
    box-sizing: border-box;
    width: min(440px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px 24px;
    font-family: Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: .01em;
    color: #3b4a5e;
}

.ui-hint-popup.popup-window-dark .popup-window-angly--arrow {
    background-color: #fff;
}

/* phones: the conditions do not fit next to the "?", so the popup opens centred on the screen */
@media screen and (max-width: 767px) {
    .popup-window.ui-hint-popup.popup-window-dark {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%);
    }

    .ui-hint-popup.popup-window-dark .popup-window-angly {
        display: none;
    }
}

/* ui.hint resets the line height to the font size and adds a 7px margin */
.ui-hint-popup .ui-hint-content {
    max-width: none;
    margin: 0;
    line-height: inherit;
}

.vk-terms {
    font-size: 14px;
    line-height: 1.5;
}

/* the site resets line-height to 1 on div, ul, li and p */
.vk-terms div,
.vk-terms ul,
.vk-terms li,
.vk-terms p {
    line-height: inherit;
}

.vk-terms li,
.vk-terms p {
    margin: 0;
    font-size: inherit;
}

.vk-terms .vk-terms__title {
    line-height: 1.3;
}

.vk-terms__title {
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #14233c;
}

.vk-terms__subtitle {
    margin-bottom: 6px;
    font-weight: 700;
    color: #14233c;
}

.vk-terms__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.vk-terms__list li {
    position: relative;
    padding-left: 18px;
}

.vk-terms__list li + li {
    margin-top: 4px;
}

.vk-terms__list li::before {
    content: '';
    position: absolute;
    top: calc((1.5em - 7px) / 2);
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(85.41deg, #00bbe4 40.54%, #a2d537 102.22%);
}

.vk-terms__price {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f3f6f9;
    color: #14233c;
}

.vk-terms__price b {
    white-space: nowrap;
}

.vk-terms__text + .vk-terms__text {
    margin-top: 8px;
}

/* Вэллкомбо: "ВЭЛЛКОМБО 300 ?" on one line; the type scales with the card width so it never wraps */
.vk-grid .vk-card__head {
    container-type: inline-size;
}

.vk-grid .vk-card__name {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.vk-grid .vk-card__brand {
    margin-bottom: 0;
    font-size: clamp(12px, calc((100cqi - 90px) / 12.5), 20px);
    letter-spacing: .06em;
}

.vk-grid .vk-card__plan {
    font-size: clamp(19px, calc((100cqi - 90px) / 7.8), 32px);
}

.vk-terms .vk-nw {
    white-space: nowrap;
}

/* ------------------------------------------------------------------ lite variant
   /private/ "Выберите тариф": the same parts as the Вэллкомбо card, toned down:
   the icon sits in a pale brand tile, the wave is paler, the shadow lighter and the button
   has a soft brand tint that turns into the full gradient on hover */

/* the "Квартира" / "Частный дом" tabs toggle cards with tariff-card--active */
.tariff-card.vk-card:not(.tariff-card--active) {
    display: none;
}

.tariff-card.vk-card--lite {
    container-type: inline-size;
    padding: 24px 24px 22px;
    border-radius: 20px;
    box-shadow: 0 6px 22px rgba(20, 60, 110, .06);
}

@media (hover: hover) {
    .tariff-card.vk-card--lite:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 34px rgba(20, 60, 110, .11);
    }
}

@media screen and (max-width: 400px) {
    .tariff-card.vk-card--lite {
        padding: 20px 16px 18px;
    }
}

.vk-card--lite .vk-card__head {
    gap: 12px;
    min-height: 0;
}

.vk-card--lite .vk-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(85.41deg, rgba(0, 187, 228, .12) 40.54%, rgba(162, 213, 55, .16) 102.22%);
}

.vk-card--lite .vk-card__icon svg {
    width: 26px;
    height: 26px;
}

.vk-card--lite .vk-card__name {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.vk-card--lite .vk-card__wave {
    margin: 14px -4px 16px;
    opacity: .5;
}

.vk-card--lite .vk-card__options {
    margin-bottom: 20px;
}

.vk-card--lite .vk-card__btn {
    height: 48px;
    background: linear-gradient(85.41deg, rgba(0, 187, 228, .14) 40.54%, rgba(162, 213, 55, .2) 102.22%);
    color: #0091c7;
    font-size: 15px;
    transition: background .2s, color .2s, box-shadow .2s;
}

.vk-card--lite .vk-card__btn:hover,
.vk-card--lite .vk-card__btn:focus-visible {
    background: linear-gradient(85.41deg, #00bbe4 40.54%, #a2d537 102.22%);
    box-shadow: 0 10px 24px rgba(100, 212, 219, .3);
    color: #fff;
}

/* narrow cards (four in a row at 1366-1500, three house cards at 992-1365, small phones) */
@container (max-width: 300px) {
    .vk-card--lite .vk-card__icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .vk-card--lite .vk-card__icon svg {
        width: 24px;
        height: 24px;
    }

    .vk-card--lite .vk-card__name {
        font-size: 22px;
    }

    .vk-card--lite .vk-card__facts {
        gap: 10px;
    }

    .vk-card--lite .vk-card__fact {
        gap: 6px;
        font-size: 12px;
    }

    .vk-card--lite .vk-card__fact svg {
        width: 22px;
        height: 22px;
    }

    .vk-card--lite .vk-card__speed b {
        font-size: 20px;
    }

    .vk-card--lite .vk-card__options {
        padding: 12px;
    }

    .tariff-card.vk-card--lite .vk-card__option {
        gap: 8px;
    }

    .tariff-card.vk-card--lite .vk-card__option-name {
        font-size: 13px;
        white-space: nowrap;
    }

    .vk-card--lite .vk-card__option-price {
        font-size: 13px;
    }

    .vk-card--lite .vk-card__btn {
        font-size: 14px;
    }
}

/* three house cards at 992-1010px: "до 1000 Мбит/с" needs the facts row a little tighter */
@container (max-width: 240px) {
    .vk-card--lite .vk-card__facts {
        gap: 6px;
    }
}

/* the narrowest phones (320px): keep "Видеонаблюдение 500 ₽/мес" inside the options panel */
@container (max-width: 230px) {
    .vk-card--lite .vk-card__options {
        padding: 12px 10px;
    }

    .tariff-card.vk-card--lite .vk-card__option-name,
    .vk-card--lite .vk-card__option-price {
        font-size: 12px;
    }
}
