/* 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;
}
/* Plan search (dashboard → Upgrade Plan). A filtered-out card must really go:
   the card's own display rule would otherwise beat the hidden attribute. */
.fame-upg-card[hidden] { display: none !important; }
.fame-upg-searchbar {
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
}
.fame-upg-searchbar svg { flex: 0 0 auto; width: 20px; height: 20px; color: #667382; }
.fame-upg-searchbar input[type="search"] {
    flex: 1 1 auto; min-width: 0; height: 40px; border: 0; outline: 0; background: transparent;
    font-size: 15px; color: #121F3E;
}
.fame-upg-searchcount { flex: 0 0 auto; font-size: 13px; color: #667382; white-space: nowrap; }

/* The title links to the plan's own product page — it should read as the
   heading it already was, and only show itself as a link on hover. */
.fame-upg-namelink {
    color: inherit;
    text-decoration: none;
}
.fame-upg-namelink:hover,
.fame-upg-namelink:focus-visible {
    color: #206bc4;
    text-decoration: underline;
}
.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;
}
/* Variable plan, variation(s) ticked: one block per variation under its own
   "<Variation> Features / Courses" heading (fame-upgrade-plan.js). */
.fame-upg-inc-subtitle {
    margin: 16px 0 8px;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #0063E3;
}
/* The default (nothing ticked) list; the JS hides it with the hidden attribute. */
.fame-upg-inc-default[hidden] { display: none; }
.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) {
    /* minmax(0,1fr) — NOT a bare 1fr: `1fr` is minmax(auto,1fr), so a wide grid
       child (the terms panel) keeps its min-content width and pushes the card
       past its container on mobile. minmax(0,…) + min-width:0 lets it shrink. */
    .fame-upg-card { grid-template-columns: minmax(0, 1fr); }
    .fame-upg-card > * { min-width: 0; }
}

/* 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;}
    /* Nothing inside the card may force it wider than the phone screen. */
    .fame-upg-terms, .fame-upg-term > label { min-width: 0; }
    .fame-upg-term-name { min-width: 0; overflow-wrap: anywhere; }
    .fame-upg-eldesc { font-size: 14px; }
}
@media (max-width: 480px) {
    .fame-upg-eltitle { font-size: 21px; line-height: 1.3; }
    .fame-upg-term > label {flex-wrap: wrap;}
    .fame-upg-name {font-size: 20px;line-height: 26px;}
    div.fame-upg-var-terms {padding-left: 0px;border: none;}
}

/* ---- Variable products: multi-select variations with nested durations -----
   Every variation is a checkbox and the list stays put; ticking one slides its
   own durations open underneath it. So a student can take several variations at
   once, each on its own term. */

.fame-upg-vars { display: block; }
.fame-upg-var-group { list-style: none; margin: 0 0 8px; }
.fame-upg-var-group:last-child { margin-bottom: 0; }

/* The variation row itself reads as a heading for the terms nested under it. */
.fame-upg-var-group > .fame-upg-var { margin: 0; }
.fame-upg-var-group.is-purchased > .fame-upg-var { border-color: #cfe3ff; background: #f5f9ff; }
.fame-upg-var-group.is-locked > .fame-upg-var { opacity: .55; }

/* The nested duration panel. Height is animated by the script; `hidden` keeps it
   out of the flow entirely when shut, so a closed variation costs no space. */
.fame-upg-var-terms {
    overflow: hidden;
    transition: height 260ms ease;
    padding-left: 18px;
    border-left: 2px solid #e8eefb;
    margin: 8px 0 0 12px;
}
.fame-upg-var-terms > .fame-upg-terms { margin: 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; }

/* ---- Footer: CTA left, running total right (variable plans only) ---- */
.fame-upg-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.fame-upg-foot .fame-upg-cta { margin: 0; }

/* The money lives in the CTA ("Buy Now (Total: …)"); this carries only the
   count, so the same number never appears twice. */
.fame-upg-total {
    margin-left: auto;
    text-align: right;
    font-size: 12.5px;
    font-weight: 600;
    color: #7b8798;
    white-space: nowrap;
}

/* The combined "Includes:" list is rebuilt by the script; its sources are
   rendered hidden and never shown directly. */
.fame-upg-inc-sources { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .fame-upg-var-terms { transition: none; }
}
