/* Dashboard → Upgrade Plan (design: pricing.png).
   Card = two columns: plan identity + includes list (left), purchase summary +
   duration radios + CTA (right). Stacks below 900px. */



.fame-upg-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: left;
}
.fame-upg-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 530px;
    gap: 50px;
    align-items: start;
}
.fame-upg-card.is-current {
    background-color: #E8F0FA;
    box-shadow: none;
}

/* ---- Left column ---- */
.fame-upg-idrow { display: flex; align-items: flex-start; gap: 12px; }
.fame-upg-ico {
    flex: 0 0 auto; width: 55px; height: 55px; border-radius: 10px;
    background-color: #D1E2F8; color: #0063E3;
    display: inline-flex; align-items: center; justify-content: center;
}
.fame-upg-ico svg { width: 24px; height: 24px; }
.fame-upg-idtext { min-width: 0; }
.fame-upg-name {
    margin: 0;
    color: #121F3E;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-style: normal;
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    word-break: break-all;
}
.fame-upg-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: .01em;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 18px;
    color: #ffffff;
}
.fame-upg-badge.is-current { background-color: #FFB400; }
.fame-upg-badge.is-reco { background: #2f80ed; color: #fff; }
.fame-upg-sub {
    margin: 2px 0 0;
    font-style: normal;
    font-weight: 500;
    font-size: 14px;
    line-height: 24px;
    color: #0063E3;
}
.fame-upg-inc-title {
    margin: 30px 0 10px;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    text-decoration-line: underline;
    color: #555767;
}
.fame-upg-features {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 26px;
}
.fame-upg-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #A7AAB2;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 26px;
    color: #656D7F;
    text-align: left;
}
.fame-upg-features svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #2f80ed;
}
@media (max-width: 575px) { .fame-upg-features { grid-template-columns: 1fr; } }

/* ---- Right column ---- */
.fame-upg-buy {
    background-color: #EFF3F9;
    border: 1px solid #eef2f7;
    border-radius: 10px;
    padding: 20px 15px;
}
.is-current .fame-upg-buy {
    background-color: #ffffff;
}
.fame-upg-owned {
    background-color: #ffffff;
    border-bottom: 1px solid #A7AAB2;
    padding: 0px 5px 10px 5px;
    margin-bottom: 14px;
}
.fame-upg-owned-row { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; color: #47536b; }
.fame-upg-owned-row span {
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    line-height: 18px;
    color: #121F3E;
}
.fame-upg-owned-row strong {
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #5E6D81;
}
.fame-upg-owned-price {
    margin-left: auto;
    font-style: normal;
    font-weight: 800;
    font-size: 16px;
    line-height: 22px;
    color: #0063E3;
}
.fame-upg-expiry {
    margin: 0 0 15px 0;
    text-align: center;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 17px;
    color: #0063E3;
}

.fame-upg-terms {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    gap: 15px;
}
.fame-upg-term { position: relative; }
.fame-upg-term > label {
    display: flex; align-items: center; gap: 10px; width: 100%; margin: 0;
    background: #fff; border: 1px solid #e6ecf5; border-radius: 10px;
    padding: 12px 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.fame-upg-term > label:hover { border-color: #cfdcf0; }
.fame-upg-term input { width: 17px; height: 17px; accent-color: #2f80ed; flex: 0 0 auto; margin: 0; }
.fame-upg-term-name { font-size: 13.5px; color: #47536b; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Saving pill after the duration label — same red as the pricing-plans
   element's .fame-pp-off so both surfaces read as one system. */
.fame-upg-term-off {
    display: inline-flex;
    align-items: center;
    background: #FAE8EA;
    color: #e0455a;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 14px;
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
}
.fame-upg-term-price { margin-left: auto; font-size: 14px; font-weight: 700; color: #16203a; white-space: nowrap; }
.fame-upg-term-usd { color: #2f80ed; margin-left: 6px; font-weight: 700; }
.fame-upg-term input:checked + .fame-upg-term-name { color: #16203a; font-weight: 600; }
.fame-upg-term:has(input:checked) > label { border-color: #2f80ed; box-shadow: 0 0 0 3px rgba(47, 128, 237, .10); }

/* Owned / too-small rows are inert and read as such. */
.fame-upg-term.is-purchased > label,
.fame-upg-term.is-locked > label { cursor: not-allowed; background-color: #EFF3F9; opacity: .75; }
.fame-upg-term-tag {
    display: flex;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    background-color: #000000;
    position: absolute;
    top: 0;
    left: 0;
    padding: 3px 12px;
    border-radius: 80px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
.is-locked .fame-upg-term-tag {
    top: -16px;
    opacity: 0;
    visibility: hidden;
}
li.is-locked:hover .fame-upg-term-tag {
    opacity: 1;
    visibility: visible;
}
.is-locked .fame-upg-term-tag:before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 19px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #000000;
}
.is-purchased .fame-upg-term-tag {
    background-color: #FFB400;
    right: 10px;
    left: auto;
    top: -11px;
}

.fame-upg-cta {
    width: 100%;
    height: 48px;
    border: 1px solid #0063E3;
    border-radius: 10px;
    background-color: #0063E3;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background .15s;
}
.fame-upg-cta:hover {
    background-color: #ffffff;
    color: #0063E3;
}
.is-current .fame-upg-cta {
    border-color: #F8B81F;
    background-color: #F8B81F;
    color: #ffffff;
}
.is-current .fame-upg-cta:hover {
    border-color: #F8B81F;
    background-color: #ffffff;
    color: #F8B81F;
}
.fame-upg-cta:disabled { background: #b9c6d8; cursor: default; }
.fame-upg-cta svg { width: 18px; height: 18px; }
.fame-upg-maxed { margin: 8px 0 0; font-size: 12px; color: #7a8699; text-align: center; }

/* Live PKR→USD note — top right of the first card, above its duration rows. */
.fame-upg-rate { margin: 0 0 10px; font-size: 12px; color: #7a8699; text-align: right; }
.fame-upg-rate:empty { display: none; }

/* ---- Help band ---- */
.fame-upg-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: linear-gradient(90deg, #D8EDFF 0%, #FFEFFF 100%);
    border-radius: 10px;
}
.fame-upg-help-title {
    margin: 0;
    font-style: normal;
    font-weight: 800;
    font-size: 24px;
    line-height: 29px;
    color: #121F3E;
}
.fame-upg-help-sub {
    margin: 0;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: #333333;
}
.fame-upg-help > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.fame-upg-wa {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    background-color: #49C192;
    box-shadow: 2px 2px 25px rgba(8, 20, 102, 0.08);
    border-radius: 10px;
    font-style: normal;
    font-weight: 700;
    font-size: 18px;
    line-height: 22px;
}
.fame-upg-wa:hover { background: #1eb955; color: #fff; }
.fame-upg-wa svg { width: 24px; height: 24px; }

@media (max-width: 991px) {
    .fame-upg-card { grid-template-columns: 1fr; }
}

/* Upgrade settlement summary (what the cancelled plan settled for). */
.fame-upg-settle {
    background: #eefaf3; border: 1px solid #cdeddd; border-radius: 10px;
    padding: 11px 13px; margin-bottom: 14px;
}
.fame-upg-settle-title {
    display: flex; align-items: center; gap: 7px; margin: 0 0 5px;
    font-size: 13px; font-weight: 700; color: #1f9d57;
}
.fame-upg-settle-title svg { width: 15px; height: 15px; }
.fame-upg-settle-line { margin: 0; font-size: 12.5px; color: #47536b; line-height: 1.5; }
.fame-upg-settle-line strong { color: #16203a; }

/* "Buy New Plan" is a scroll trigger, not a link — keep the button chrome flat. */
.fame-upg-buynew { cursor: pointer; }
.fame-upg-buynew svg { width: 24px; height: 24px; }

/* Brief highlight on the card the header button scrolls to. */
.fame-upg-card.is-flagged {
    box-shadow: 0 0 0 3px rgba(47, 128, 237, .35);
    transition: box-shadow .25s ease;
}

/* ---------------------------------------------------------------------------
   Outside the dashboard (system / mock test / webinar detail), the plan cards
   render via components.tag-package-cta and the dashboard stylesheet is NOT
   loaded — so give the card its own surface here instead of leaning on
   .fame-dash-card. Same values, so the dashboard is unchanged.
   --------------------------------------------------------------------------- */
.fame-upg-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 2px 2px 25px rgba(8, 20, 102, 0.08);
}

/* The group wrapper is just a heading + the cards; the cards carry the box, so
   the legacy white panel around them is dropped in this variant. */
.fame-tag-package-cta--plans .fame-tag-package-cta__group {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}
.fame-tag-package-cta--plans .fame-tag-package-cta__group + .fame-tag-package-cta__group {
    margin-top: 22px;
}
.fame-tag-package-cta--plans .fame-upg-card {
    border: 1px solid #dbe4ee;
    box-shadow: 0 1px 3px rgba(8, 20, 102, 0.04);
}
.fame-tag-package-cta--plans .fame-upg-list { margin: 0; }
.fame-tag-package-cta--plans .fame-upg-name,
.fame-tag-package-cta--plans .fame-upg-inc-title { line-height: 1.35; }

/* Inside the webinar registration modal the column layout has no room. */
.fw-modal-packages .fame-upg-card { grid-template-columns: 1fr; padding: 20px; }

/* ---- "View more" features (lists longer than 12) ----
   Collapsed by default; fame-upgrade-plan.js animates max-height to the panel's
   own height. Kept open by .is-open so it survives a resize. */
.fame-upg-more {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
}
.fame-upg-more.is-open { max-height: none; }
.fame-upg-features-more { margin-top: 12px; }

.fame-upg-morebtn {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 12px; padding: 0;
    background: none; border: 0; cursor: pointer;
    font-family: inherit; font-size: 13.5px; font-weight: 600; color: #2f80ed;
}
.fame-upg-morebtn:hover { color: #1a63c9; }
.fame-upg-morebtn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.fame-upg-morebtn.is-open svg { transform: rotate(180deg); }

/* ---- Page-element chrome (fame/tag-pricing-plans) ------------------------
   The element renders the SAME cards as the dashboard, so it ships no
   stylesheet of its own — only the heading + empty state live here. */
.fame-upg-elhead { margin: 0 0 26px; text-align: center; }
.fame-upg-eltitle { margin: 0; font-size: 30px; font-weight: 700; line-height: 1.25; color: #16203a; }
.fame-upg-eldesc { margin: 10px auto 0; max-width: 720px; font-size: 15px; line-height: 1.6; color: #5b6b86; }

.fame-upg-elempty {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px; border: 1px dashed #d5dced; border-radius: 12px;
    background: #f8fafc; color: #5b6b86; font-size: 14.5px;
}
.fame-upg-elempty svg { width: 22px; height: 22px; flex: 0 0 auto; }
.fame-upg-elempty p { margin: 0; }

@media (max-width: 767px) {
    .fame-upg-eltitle { font-size: 24px; }
    .fame-upg-card {padding: 15px;}
}

/* ---- Variable products: variation step → duration step --------------------
   A variable plan is bought as "variation first, then one of that variation's
   durations". Both steps live in the same box and slide over each other; the
   leaving one is taken out of flow so they overlap during the transition and
   the card never jumps. */
.fame-upg-steps { position: relative; overflow: hidden; transition: height 280ms ease; }
.fame-upg-steps > [data-upg-step] { transition: transform 280ms ease, opacity 220ms ease; }
.fame-upg-steps > [data-upg-step].is-abs { position: absolute; inset: 0 0 auto 0; }
.fame-upg-steps > [data-upg-step].is-from-right { transform: translateX(100%); opacity: 0; }
.fame-upg-steps > [data-upg-step].is-from-left  { transform: translateX(-100%); opacity: 0; }
.fame-upg-steps > [data-upg-step].is-to-left    { transform: translateX(-100%); opacity: 0; }
.fame-upg-steps > [data-upg-step].is-to-right   { transform: translateX(100%); opacity: 0; }

/* "From <price>" on a variation row reads quieter than the price itself. */
.fame-upg-from { font-weight: 600; color: #7b8798; font-size: 12px; margin-right: 2px; }

.fame-upg-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0 0 10px; padding: 0;
    border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 13px; font-weight: 700; color: var(--fame-blue, #0566e3);
}
.fame-upg-back:hover { text-decoration: underline; }
.fame-upg-back svg { width: 14px; height: 14px; }

.fame-upg-var-current {
    margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: #45536b;
}
.fame-upg-var-current strong { color: #16203a; }

@media (prefers-reduced-motion: reduce) {
    .fame-upg-steps, .fame-upg-steps > [data-upg-step] { transition: none; }
}
