/* =========================================================
   TARIFFS
   ========================================================= */

.tariffs-page {
    width: 100%;
    padding: 96px 0 80px;
    background: #fff;
    color: #1A1A2B;
}

.tariffs-page__container {
    max-width: 1280px;
    margin: 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.tariffs-page__header {
    margin: 0 auto 40px;
    text-align: center;
}

.tariffs-page__title {
    margin: 0 0 17px;
    color: #1A1A2B;
    font-size: 40px;
    line-height: 40px;
    font-weight: 600;
    letter-spacing: -0.04em;
}

.tariffs-page__subtitle {
    max-width: 480px;
    margin: 0 auto;
    color: #06060B80;
    font-size: 16px;
    line-height: 24px;
}

/* =========================================================
   GRID
   ========================================================= */

.tariffs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* =========================================================
   CARD
   ========================================================= */

.tariff-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid #06060B0D;
    border-radius: 32px;
    background: #fff;
    box-shadow: 1px 1px 24px 0 #1A1A2B0A;
    min-width: 0;
}

.tariff-card__header {
    display: flex;
    gap: 16px;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tariff-card--current {
    border-color: #8080D8;
}

/* =========================================================
   CURRENT BADGE
   ========================================================= */

.tariff-card__badge {
    position: absolute;
    top: -1px;
    left: 22px;
    padding: 4px 8px;
    border-radius: 0 0 7px 7px;
    background: #8581e9;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
}

/* =========================================================
   CARD TOP
   ========================================================= */

.tariff-card__top {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 31px;
    margin-bottom: 10px;
}

.tariff-card__title {
    color: #1A1A2B;
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
}

/* =========================================================
   PERIOD SWITCH
   ========================================================= */

.tariff-periods {
    display: flex;
    align-items: center;
    background: #8080D80D;
    border-radius: 999px;
    flex-shrink: 0;
}

.tariff-period {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 4px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #06060BCC;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}

.tariff-period.is-active {
    background: #8080D8;
    color: #fff;
}

/* =========================================================
   DESCRIPTION
   ========================================================= */

.tariff-card__description {
    margin: 0 0 24px;
    color: #06060B99;
    font-size: 16px;
    line-height: 24px;
}

/* =========================================================
   PRICE
   ========================================================= */

.tariff-card__price-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.tariff-card__price, .tariff-card__currency {
    color: #1A1A2B;
    font-size: 32px;
    line-height: 40px;
    font-weight: 600;
}

.tariff-card__old-price {
    display: none;
    color: #9B9B9D;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
    text-decoration: line-through;
}

.tariff-card__old-price.is-visible {
    display: inline;
}

.tariff-card__discount {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 360px;
    background: #08BF551A;
    color: #08BF55;
    backdrop-filter: blur(24px);
    font-size: 16px;
    max-height: 24px;
    line-height: 16px;
    font-weight: 600;
}

.tariff-card__discount.is-visible {
    display: inline-flex;
}

/* =========================================================
   FEATURES
   ========================================================= */

.tariff-card__features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    margin-bottom: 36px;
}

.tariff-card__features li {
    position: relative;
    padding-left: 32px;
    color: #06060B99;
    font-size: 16px;
    line-height: 24px;
}

.tariff-card__features li::before {
    content: "✓";
    position: absolute;
    top: 0;
    left: 0;
    color: #4CD585;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}

/* =========================================================
   BOTTOM / BUTTON
   ========================================================= */

.tariff-card__bottom {
    margin-top: auto;
    padding-top: 17px;
}

.tariff-card__current-info {
    margin-bottom: 8px;
    color: #96969d;
    font-size: 10px;
    line-height: 1.3;
}

.tariff-card__current {
    margin-bottom: 12px;
}

.tariff-card__current-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 4px;
    color: #8080D8;
    font-size: 14px;
    line-height: 24px;
}

.tariff-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 16px;
    border: 0;
    border-radius: 12px;
    background: #8080D81A;
    color: #7171BF;
    font-size: 16px;
    line-height: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.tariff-button:hover {
    background: #e8e6fa;
    color: #625dc6;
}

.tariff-button:disabled {
    cursor: default;
}

.tariff-button.is-loading {
    opacity: .65;
    cursor: wait;
}

/* =========================================================
   DISABLED TARIFF BUTTON / TOOLTIP
   ========================================================= */

.tariff-button-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.tariff-button--disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tariff-button--disabled:hover {
    background: #f0effb;
    color: #706bd0;
}

.tariff-button-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    z-index: 20;
    width: 210px;
    padding: 9px 11px;
    transform: translateX(-50%);
    box-sizing: border-box;
    border-radius: 8px;
    background: #252535;
    color: #fff;
    font-size: 10px;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
}

.tariff-button-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -5px;
    width: 10px;
    height: 10px;
    transform: translateX(-50%) rotate(45deg);
    background: #252535;
}

.tariff-button-wrapper:hover .tariff-button-tooltip {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   ERROR
   ========================================================= */

.tariff-error {
    display: none;
    margin-top: 8px;
    color: #e45d69;
    font-size: 10px;
    line-height: 1.4;
}

.tariff-error.is-visible {
    display: block;
}

/* =========================================================
   PRESENTATION
   ========================================================= */

.tariffs-presentation {
    margin-top: 40px;
    padding: 48px;
    border-radius: 32px;
    text-align: center;
    background: linear-gradient(91.82deg, #E8EDFF 0%, #FFFFFF 16%, #FFFFFF 87.82%, #E8EDFF 100%);
}

.tariffs-presentation__content {
    max-width: 552px;
    margin: 0 auto;
}

.tariffs-presentation__title {
    margin: 0 0 12px;
    color: #1A1A2B;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.tariffs-presentation__text {
    margin: 0 auto 24px;
    color: #06060B99;
    font-size: 16px;
    line-height: 24px;
}

.tariffs-presentation__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 16px 28px;
    border-radius: 12px;
    background: #8080D8;
    color: #fff;
    font-size: 16px;
    line-height: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.tariffs-presentation__button:hover {
    background: #706bd0;
    color: #fff;
}

/* =========================================================
   EMPTY
   ========================================================= */

.tariffs-empty {
    grid-column: 1 / -1;
    padding: 60px 20px;
    border: 1px dashed #dedee6;
    border-radius: 18px;
    color: #8b8b93;
    font-size: 13px;
    text-align: center;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
    .tariffs-page__container {
        width: calc(100% - 48px);
    }

    .tariffs-grid {
        gap: 16px;
    }

    .tariff-card {
        padding: 24px;
        border-radius: 24px;
    }

    .tariff-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tariff-card__title {
        font-size: 22px;
        line-height: 28px;
    }

    .tariff-periods {
        align-self: flex-start;
        max-width: 100%;
    }

    .tariff-period {
        height: 28px;
        padding: 4px 10px;
        font-size: 13px;
        line-height: 18px;
    }

    .tariff-card__price,
    .tariff-card__currency {
        font-size: 28px;
        line-height: 36px;
    }

    .tariff-card__old-price {
        font-size: 18px;
        line-height: 24px;
    }

    .tariff-card__discount {
        font-size: 14px;
        line-height: 14px;
        max-height: 22px;
    }

    .tariff-card__description {
        font-size: 14px;
        line-height: 20px;
        margin-bottom: 20px;
    }

    .tariff-card__features {
        margin-bottom: 28px;
    }

    .tariff-card__features li {
        padding-left: 28px;
        font-size: 14px;
        line-height: 20px;
    }

    .tariff-card__features li::before {
        font-size: 14px;
        line-height: 20px;
    }

    .tariff-button {
        height: 44px;
        padding: 14px;
        font-size: 14px;
        line-height: 14px;
    }

    .tariffs-presentation {
        padding: 40px;
        border-radius: 24px;
    }
}

@media (max-width: 900px) {
    .tariffs-page {
        padding: 56px 0 64px;
    }

    .tariffs-page__container {
        width: min(680px, calc(100% - 48px));
    }

    .tariffs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .tariff-card {
        min-height: 0;
    }

    .tariff-card__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tariffs-presentation {
        margin-top: 32px;
        padding: 32px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {
    .tariffs-page {
        padding: 32px 0 64px;
    }

    .tariffs-page__container {
        width: calc(100% - 24px);
    }

    .tariffs-page__header {
        margin-bottom: 32px;
    }

    .tariffs-page__title {
        font-size: 32px;
    }

    .tariffs-page__subtitle {
        font-size: 14px;
        line-height: 20px;
        max-width: 296px;
    }

    .tariffs-grid {
        grid-template-columns: 1fr;
    }

    .tariff-card {
        padding: 24px;
    }

    .tariff-card__title {
        font-size: 20px;
        line-height: 28px;
    }

    .tariff-periods {
        width: 100%;
        justify-content: space-between;
    }

    .tariff-period {
        flex: 1;
        min-width: 0;
        padding: 0 6px;
    }

    .tariff-card__description {
        min-height: 0;
        margin-bottom: 16px;
        font-size: 14px;
        line-height: 20px;
    }

    .tariffs-presentation {
        margin-top: 32px;
        padding: 24px;
    }

    .tariffs-presentation__title {
        font-size: 24px;
        line-height: 32px;
    }

    .tariffs-presentation__text {
        font-size: 14px;
        line-height: 20px;
        max-width: 296px;
    }

    .tariffs-presentation__button {
        height: 40px;
        max-width: 179px;
        padding: 13px 18px;
        border-radius: 10px;
        font-size: 14px;
        line-height: 14px;
    }
}

/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 390px) {
    .tariff-card__top {
        display: block;
    }

    .tariff-periods {
        margin-left: 0;
    }

    .tariff-card__price, .tariff-card__currency {
        font-size: 24px;
        line-height: 32px;
    }

    .tariff-card__old-price {
        font-size: 16px;
        line-height: 24px;
    }

    .tariff-card__discount {
        font-size: 14px;
        line-height: 14px;
        max-height: 22px;
    }

    .tariff-card__features li {
        padding-left: 28px;
        font-size: 14px;
        line-height: 20px;
    }

    .tariff-card__features li::before {
        font-size: 14px;
        line-height: 20px;
    }

    .tariff-button {
        height: 40px;
        padding: 13px;
        border-radius: 10px;
        font-size: 14px;
        line-height: 14px;
    }
}