/* ONYX SIMPLE HOME + DIRECT CHECKOUT V1.5 */
:root {
    --onyx-simple-card: rgba(20, 14, 31, .82);
    --onyx-simple-border: rgba(255,255,255,.08);
}

#page-home {
    max-width: 900px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    margin-inline: auto !important;
}

#page-home .onyx-home-main-column {
    width: 100%;
    max-width: 860px;
    margin-inline: auto;
}

#page-home .onyx-home-side-column {
    display: none !important;
}

#page-home .welcome-card {
    min-height: 132px !important;
    margin-bottom: 14px !important;
}

#page-home .welcome-card p {
    margin-top: 5px !important;
    color: var(--text-muted) !important;
}

#subscription-display {
    padding: clamp(20px, 3vw, 30px) !important;
}

#subscription-display > div:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
}

#subscription-display > div:first-child > .section-title {
    min-width: 0;
}

#subscription-display > div:first-child > #sub-status-badge,
#subscription-display > div:first-child > #onyx-simple-balance-chip {
    justify-self: end;
}

.onyx-simple-balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid var(--onyx-simple-border);
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.onyx-simple-balance-chip strong {
    color: #fff;
    font-size: 13px;
}

.onyx-simple-primary {
    min-height: 56px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    box-shadow: 0 14px 34px rgba(229,32,133,.22) !important;
}

.onyx-simple-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.onyx-simple-action {
    min-width: 0;
    min-height: 92px;
    padding: 16px 12px;
    border: 1px solid var(--onyx-simple-border);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
    color: #fff;
    font: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.onyx-simple-action:hover,
.onyx-simple-action:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(229,32,133,.32);
    background: rgba(229,32,133,.075);
    outline: none;
}

.onyx-simple-action img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.onyx-simple-action span {
    max-width: 100%;
    font-size: 14px;
    font-weight: 740;
    text-align: center;
    line-height: 1.2;
}

.onyx-simple-more {
    margin-top: 14px !important;
    min-height: 44px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
    font-size: 14px !important;
}

.onyx-simple-help {
    width: 100%;
    max-width: 860px;
    margin: 16px auto 0 !important;
}

.onyx-onboarding-steps {
    display: grid;
    gap: 12px;
    margin: 10px 0 22px;
    text-align: left;
}

.onyx-onboarding-step {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    align-items: center;
    gap: 14px;
    padding: 16px 16px;
    border: 1px solid var(--onyx-simple-border);
    border-radius: 18px;
    background: rgba(255,255,255,.03);
}

.onyx-onboarding-step b {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(255,60,180,.22), rgba(121,66,255,.2));
    color: #fff;
    font-size: 17px;
}

.onyx-onboarding-step strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.onyx-onboarding-step small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.45;
}

.onyx-checkout-methods {
    margin: 15px 0 4px;
}

.onyx-checkout-methods-label {
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 650;
}

.onyx-checkout-method-info {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border: 1px solid var(--onyx-simple-border);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(229,32,133,.10), rgba(119,52,240,.075));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}

.onyx-checkout-method-info-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(229,32,133,.14);
    font-size: 17px;
}

.onyx-checkout-method-info strong {
    display: block;
    font-size: 12px;
    font-weight: 780;
}

.onyx-checkout-method-info small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.4;
}

.onyx-checkout-balance-breakdown {
    display: grid;
    gap: 0;
    margin-top: 2px;
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.onyx-checkout-balance-breakdown .onyx-tariff-line {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
}

.onyx-checkout-balance-row strong {
    color: #7df0ad !important;
}

.onyx-checkout-external-row strong {
    color: #fff !important;
    font-size: 16px !important;
}

#onyx-checkout-methods-v1[hidden] {
    display: none !important;
}

@media (max-width: 620px) {
    .onyx-checkout-balance-breakdown .onyx-tariff-line {
        min-height: 39px;
    }

    .onyx-checkout-external-row strong {
        font-size: 15px !important;
    }
}

/* ONYX CHECKOUT SUMMARY + DESKTOP ALIGNMENT V1.5.2 */
/* Исходный total остаётся источником полной цены для старого калькулятора,
   но пользователю в крупной строке показывается остаток после списания баланса. */
.onyx-checkout-source-total {
    display: none !important;
}

.onyx-checkout-balance-breakdown {
    margin-top: 5px;
    border-bottom: 0 !important;
}

#onyx-checkout-total-due {
    color: #fff !important;
}

/* На широком экране все основные блоки страницы подписок идут по одной оси
   и имеют одну рабочую ширину. Мобильная раскладка не меняется. */
@media (min-width: 821px) {
    #page-subscriptions {
        width: 100% !important;
        max-width: 1040px !important;
        margin-inline: auto !important;
    }

    #page-subscriptions > .header,
    #page-subscriptions > .onyx-browser-install-offer,
    #page-subscriptions > #sub-active-page,
    #page-subscriptions > #sub-buy-block,
    #page-subscriptions > .onyx-faq-help-card {
        width: 100% !important;
        max-width: 920px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    #page-subscriptions #sub-buy-block > .section-title,
    #page-subscriptions #sub-buy-block > .onyx-tariff-hint {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    #page-subscriptions #sub-buy-block > .section-title {
        margin-bottom: 14px !important;
        text-align: left !important;
    }

    #page-subscriptions .onyx-tariff-grid {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }

    #page-subscriptions .onyx-tariff-card {
        width: 100% !important;
        min-height: 174px !important;
        box-sizing: border-box !important;
    }

    #page-subscriptions #sub-buy-block > .onyx-tariff-hint {
        margin-top: 12px !important;
    }

    #page-subscriptions > .onyx-faq-help-card {
        margin-top: 18px !important;
    }
}


/* ONYX SUBSCRIPTION ACTION ICONS SYMMETRY FIX V1 */
/* Все три быстрых действия используют чёткие SVG и одинаковый визуальный размер. */
.onyx-simple-action > img.onyx-pack-icon-v1 {
    display: none !important;
}
.onyx-simple-action > img.onyx-simple-native-icon {
    display: block !important;
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    filter: saturate(1.14) brightness(1.16) drop-shadow(0 0 8px rgba(229,32,133,.38)) !important;
}
.onyx-simple-action[data-simple-action="extend"] > img.onyx-simple-native-icon,
.onyx-simple-action[data-simple-action="share"] > img.onyx-simple-native-icon,
.onyx-simple-action[data-simple-action="devices"] > img.onyx-simple-native-icon {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
}
@media (max-width: 620px) {
    .onyx-simple-action > img.onyx-simple-native-icon,
    .onyx-simple-action[data-simple-action="extend"] > img.onyx-simple-native-icon,
    .onyx-simple-action[data-simple-action="share"] > img.onyx-simple-native-icon,
    .onyx-simple-action[data-simple-action="devices"] > img.onyx-simple-native-icon {
        width: 42px !important;
        height: 42px !important;
        flex: 0 0 42px !important;
    }
}
/* END ONYX SUBSCRIPTION ACTION ICONS SYMMETRY FIX V1 */
