/* Measurements are CSS pixels from the September 2 Sketch export. */
.pricing-page {
    width: min(1100px, calc(100% - 48px));
    min-height: 0;
    padding: 53px 0 110px;
    font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.pricing-heading { max-width: 100%; }
.pricing-heading h1 { font-size: 48px; line-height: 67px; font-weight: 600; }
.pricing-heading::before { right: calc(100% + 26px); top: 7px; transform: none; }
.pricing-heading::after { left: calc(100% + 13px); top: -8px; transform: none; }
.tier-switch { height: 44px; margin: 29px auto 60px; padding: 3px; border-radius: 22px; gap: 1px; }
.tier-switch button { min-width: 0; height: 36px; padding: 0; border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.tier-art { width: 62px; height: 16px; display: block; background: center / 100% 100% no-repeat; }
.tier-vip { background-image: url("/static/img/rivervpn/price-tab-vip.png"); }
.tier-pro { background-image: url("/static/img/rivervpn/price-tab-pro.png"); }
.active .tier-vip { background-image: url("/static/img/rivervpn/price-tab-vip-active.png"); }
.active .tier-pro { background-image: url("/static/img/rivervpn/price-tab-pro-active.png"); }
.plan-grid { gap: 16px; }
.plan-card { height: 160px; padding: 28px; align-items: flex-start; transition: border-color .15s ease, background-color .15s ease; }
.plan-card > div { min-width: 0; padding-top: 4px; }
.plan-card h2 { display: block; font-size: 18px; line-height: 25px; font-weight: 400; }
.plan-card strong { margin-top: 18px; gap: 0; height: 50px; font-size: 36px; line-height: 50px; font-weight: 500; }
.plan-card strong small { font-size: 20px; font-weight: 500; line-height: inherit; }
.plan-card strong small:last-child:not(:first-child) { margin-left: 3px; }
.plan-card.selected h2, .plan-card.selected strong { color: var(--blue); }
.pricing-page[data-tier="2"] .plan-card.selected h2,
.pricing-page[data-tier="2"] .plan-card.selected strong { color: var(--purple); }
.plan-card button { position: absolute; top: 53px; right: 28px; width: 170px; height: 56px; border-radius: 30px; }
.plan-card.selected button { font-weight: 500; }
/* The second row is 3 px higher in the original card component. Match per
   membership level so an upstream catalogue reorder cannot target the wrong row. */
@media (min-width: 1024px) {
    .plan-card:nth-child(3 of [data-plan-level="1"]) button,
    .plan-card:nth-child(4 of [data-plan-level="1"]) button,
    .plan-card:nth-child(3 of [data-plan-level="2"]) button,
    .plan-card:nth-child(4 of [data-plan-level="2"]) button { top: 50px; }
}

@media (hover: hover) {
    .plan-card.selected button:hover { background: linear-gradient(90deg, rgba(41,187,255,.8) 0%, rgba(153,232,255,.8) 51%, rgba(41,187,255,.8) 100%); }
    .pricing-page[data-tier="2"] .plan-card.selected button:hover { background: linear-gradient(90deg, rgba(165,136,236,.8) 1%, rgba(227,208,252,.8) 49%, rgba(165,136,236,.8) 100%); }
}
.benefit-section { margin-top: 90px; }
.benefit-section > h2 { margin: 0 0 60px; font-size: 32px; line-height: 45px; font-weight: 600; }
.benefit-table {
    position: relative;
    isolation: isolate;
    width: calc(100% + 5px);
    margin-left: -5px;
    overflow: visible;
    border-radius: 15px;
}
.benefit-table::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: -21px;
    bottom: -21px;
    left: 57.1%;
    width: 21.58%;
    border-radius: 15px;
    background: linear-gradient(180deg, #27425A 0%, #16253D 100%);
    pointer-events: none;
}
.pricing-page[data-tier="2"] .benefit-table::before { left: 78.42%; background: linear-gradient(180deg, #35375A 0%, #1A233D 100%); }
/* The PRO highlight covers the outside edge; keep the underlying border hidden. */
.pricing-page[data-tier="2"] .benefit-table { border-right-color: transparent; }
.benefit-row { height: 61px; min-height: 61px; grid-template-columns: 35.2% repeat(3, 21.6%); }
.benefit-row > * { position: relative; z-index: 2; padding: 0 12px; border-left: 0; font-size: 16px; line-height: 22px; color: rgba(255,255,255,.45); }
.benefit-row > :nth-child(2) { border-left: 1px solid rgba(255,255,255,.1); }
.pricing-page[data-tier="2"] .benefit-row > :nth-child(3) { border-left: 1px solid var(--line); }
.benefit-row > :nth-child(2), .benefit-row > :nth-child(4) { padding-left: 16px; }
.benefit-row > :nth-child(3) { padding-left: 20px; }
.benefit-row > :first-child { color: rgba(255,255,255,.9); }
.benefit-head { height: 59px; min-height: 59px; }
.benefit-head > :first-child, .benefit-head > :nth-child(2) { color: rgba(255,255,255,.3); font-size: 18px; line-height: 25px; font-weight: 500; }
.benefit-brand { width: 61.33px; height: 16px; background: center / 100% 100% no-repeat; }
.benefit-vip { background-image: url("/static/img/rivervpn/benefit-vip.png"); }
.benefit-pro { background-image: url("/static/img/rivervpn/benefit-pro.png"); }
.pricing-page[data-tier="1"] .benefit-vip { background-image: url("/static/img/rivervpn/benefit-vip-active.png"); }
.pricing-page[data-tier="2"] .benefit-pro { background-image: url("/static/img/rivervpn/benefit-pro-active.png"); }
.pricing-page[data-tier="1"] .benefit-row > :nth-child(3),
.pricing-page[data-tier="2"] .benefit-row > :nth-child(4) { background: transparent; }
.benefit-row .yes::after, .benefit-row .no::after { content: ""; width: 30px; height: 30px; flex: 0 0 30px; background: center / contain no-repeat; }
.benefit-row .yes::after { background-image: url("/static/img/rivervpn/check-gray.png"); }
.benefit-row .no::after { background-image: url("/static/img/rivervpn/benefit-no.png"); }
.pricing-page[data-tier="1"] .benefit-row > :nth-child(3).yes::after { background-image: url("/static/img/rivervpn/benefit-check-vip.png"); }
.benefit-desktop-copy { display: block; }
.benefit-mobile-copy { display: none; }
.benefit-limit { gap: 0; }
.benefit-limit > span { white-space: nowrap; }
html[lang="en-US"] .benefit-limit, html[lang="id-ID"] .benefit-limit { gap: 4px; }
@media (min-width: 768px) and (max-width: 1023px) {
    .pricing-heading { max-width: calc(100% - 200px); }
    .pricing-heading h1 { font-size: 36px; line-height: 50px; }
    .plan-grid { grid-template-columns: 1fr; }
    .plan-card { padding-left: 22px; padding-right: 22px; }
    .plan-card button { width: 120px; right: 20px; }
    .plan-card strong { font-size: 32px; }
}
@media (max-width: 767px) {
    .pricing-page { width: 100%; padding: 30px 0 50px; overflow: hidden; }
    .pricing-heading { width: calc(100% - 48px); }
    .pricing-heading h1 { font-size: 32px; line-height: 45px; font-weight: 600; }
    .pricing-heading::before,
    .pricing-page[data-tier="2"] .pricing-heading::before { top: 25px; left: 4px; right: auto; transform: none; width: 28px; height: 28px; }
    .pricing-heading::after,
    .pricing-page[data-tier="2"] .pricing-heading::after { top: -12px; right: -5px; left: auto; transform: none; width: 40px; height: 25px; }
    .pricing-page[data-tier="2"] .pricing-heading::before { background-image: url("/static/img/rivervpn/pro-star-left.png"); }
    .pricing-page[data-tier="2"] .pricing-heading::after { background-image: url("/static/img/rivervpn/mobile-pro-star-right.png"); }
    .tier-switch { width: calc(100% - 48px); height: 36px; padding: 2.5px; margin: 20px auto; border-width: .5px; border-radius: 18px; gap: 1px; }
    .tier-switch button { height: 30px; }
    .tier-art { width: 46px; height: 12px; }
    .tier-vip { background-image: url("/static/img/rivervpn/mobile-price-tab-vip.png"); }
    .tier-pro { background-image: url("/static/img/rivervpn/mobile-price-tab-pro.png"); }
    .active .tier-vip { background-image: url("/static/img/rivervpn/mobile-price-tab-vip-active.png"); }
    .active .tier-pro { background-image: url("/static/img/rivervpn/mobile-price-tab-pro-active.png"); }
    .plan-grid { gap: 10px; padding: 0 24px; }
    .plan-card { flex-basis: 180px; height: 104px; padding: 12px 15px; border-radius: 15px; }
    .plan-card > div { width: 100%; padding-top: 2px; }
    .plan-card h2 { font-size: 16px; line-height: 22px; padding-right: 14px; white-space: nowrap; }
    .plan-card > div::after { content: ""; position: absolute; top: 45px; left: 15px; right: 15px; border-top: .5px solid rgba(255,255,255,.1); }
    .plan-card strong { height: 33px; margin-top: 17px; font-size: 24px; line-height: 33px; font-weight: 500; }
    .plan-card strong small { font-size: 14px; font-weight: 500; }
    .plan-card .plan-check { display: none; position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 0; background: url("/static/img/rivervpn/plan-check-vip.png") center / contain no-repeat; }
    .plan-card.selected .plan-check { display: block; }
    .plan-check::after { content: none; }
    .pricing-page[data-tier="2"] .plan-card .plan-check { background-image: url("/static/img/rivervpn/plan-check-pro.png"); }
    .mobile-buy { margin-top: 40px; height: 48px; font-size: 16px; line-height: 22px; font-weight: 500; }
    .benefit-section { width: calc(100% - 48px); margin: 40px auto 0; }
    .benefit-section > h2 { width: max-content; max-width: 100%; position: relative; margin: 0 auto 16px; font-size: 16px; line-height: 22px; font-weight: 500; }
    .benefit-section > h2::before, .benefit-section > h2::after { content: ""; position: absolute; top: 10px; width: 61px; height: 2px; background: center / 100% 100% no-repeat; }
    .benefit-section > h2::before { right: calc(100% + 8px); background-image: url("/static/img/rivervpn/benefit-rule-vip-left.png"); }
    .benefit-section > h2::after { left: calc(100% + 8px); background-image: url("/static/img/rivervpn/benefit-rule-vip-right.png"); }
    .pricing-page[data-tier="2"] .benefit-section > h2::before { background-image: url("/static/img/rivervpn/benefit-rule-pro-left.png"); }
    .pricing-page[data-tier="2"] .benefit-section > h2::after { background-image: url("/static/img/rivervpn/benefit-rule-pro-right.png"); }
    .benefit-table { width: calc(100% + 2px); margin-left: -2px; border-width: .5px; }
    .benefit-table::before { top: 0; bottom: 0; left: 57.14%; width: 21.58%; background: linear-gradient(180deg, rgba(133,228,255,.2) 0%, rgba(133,228,255,.06) 100%); }
    .pricing-page[data-tier="2"] .benefit-table::before { left: 78.42%; background: linear-gradient(180deg, rgba(205,176,255,.2) 0%, rgba(205,176,255,.06) 100%); }
    .benefit-row { height: 56px; min-height: 56px; grid-template-columns: 35.2% repeat(3, 21.6%); border-top-width: .5px; }
    .benefit-row > * { padding: 0 4px; font-size: 14px; line-height: 20px; overflow-wrap: normal; word-break: normal; }
    .benefit-row > :nth-child(2) { border-left-width: .5px; }
    .pricing-page[data-tier="2"] .benefit-row > :nth-child(3) { border-left-width: .5px; }
    .benefit-row > :nth-child(2), .benefit-row > :nth-child(4) { padding-left: 6px; }
    .benefit-row > :nth-child(3) { padding-left: 8px; }
    .benefit-head > :nth-child(3),
    .pricing-page[data-tier="2"] .benefit-row > :nth-child(3) { padding-left: 6px; }
    .benefit-head > :first-child, .benefit-head > :nth-child(2) { font-size: 14px; line-height: 20px; font-weight: 500; }
    .benefit-brand { width: 38px; height: 10px; transform: translateY(1.5px); }
    .benefit-vip { background-image: url("/static/img/rivervpn/mobile-benefit-vip.png"); }
    .benefit-pro { background-image: url("/static/img/rivervpn/mobile-benefit-pro.png"); }
    .pricing-page[data-tier="1"] .benefit-vip { background-image: url("/static/img/rivervpn/mobile-benefit-vip-active.png"); }
    .pricing-page[data-tier="2"] .benefit-pro { background-image: url("/static/img/rivervpn/mobile-benefit-pro-active.png"); }
    .benefit-row .yes::after, .benefit-row .no::after { width: 24px; height: 24px; flex-basis: 24px; }
    .benefit-row .yes::after { background-image: url("/static/img/rivervpn/mobile-check-gray.png"); }
    .benefit-row .no::after { background-image: url("/static/img/rivervpn/mobile-benefit-no.png"); }
    .pricing-page[data-tier="1"] .benefit-row > :nth-child(3).yes::after { background-image: url("/static/img/rivervpn/check-blue.png"); }
    .pricing-page[data-tier="2"] .benefit-row > :nth-child(4).yes::after { background-image: url("/static/img/rivervpn/mobile-check-pro.png"); }
    .benefit-desktop-copy { display: none; }
    .benefit-mobile-copy { display: block; }
    .benefit-limit { flex-direction: column; gap: 0 !important; font-size: 14px; line-height: 21px; }
    html[lang="en-US"] .pricing-heading h1, html[lang="id-ID"] .pricing-heading h1 { font-size: 30px; }
    /* Translated product names can take two lines without colliding with the
       selection mark or moving the amount outside the 104 px card. */
    html[lang="en-US"] .plan-card h2, html[lang="id-ID"] .plan-card h2 { height: 36px; padding-right: 8px; font-size: 14px; line-height: 18px; white-space: normal; text-wrap: balance; }
    html[lang="en-US"] .plan-card strong, html[lang="id-ID"] .plan-card strong { margin-top: 3px; }
    html[lang="en-US"] .plan-card > div::after, html[lang="id-ID"] .plan-card > div::after { top: 52px; }
}
