/* Subscription — plans and the balance pack (Pages/Subscription.razor).

   Container geometry is About.css's: a fixed frame inset from the sidebar that shifts left when the
   sidebar collapses. Inside it the page is one light "stage" with a warm gold glow and gold
   accents, so the upgrade page reads as premium rather than as another form.

   Everything is prefixed .sub- — index.html loads every sheet globally. */

.sub-container {
    position: fixed;
    top: 4rem;
    bottom: 4rem;
    left: 14rem;
    right: 0;
    transition: left 0.2s ease;
    overflow-y: auto;
    padding: 0 10px 10px;
    box-sizing: border-box;
    /* Everything is sized to fit a full-screen window (1080p) with no scrolling, which is what the
       user asked for. On a shorter window it still scrolls rather than cutting the pack off, just
       without a visible bar. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sub-container::-webkit-scrollbar {
    display: none;
}

.sub-container.sidebar-collapsed {
    left: 5rem;
}

.sub-stage {
    --sub-gold: #f5c542;
    --sub-gold-2: #d99a1e;
    --sub-gold-soft: rgba(245, 197, 66, 0.14);
    /* Bright gold is for fills, borders and glows; on a light surface text needs the deeper one. */
    --sub-gold-text: #a87400;
    --sub-text: #1e2433;
    --sub-muted: #6b7385;

    position: relative;
    min-height: 100%;
    padding: 16px 22px 16px;
    border-radius: 14px;
    color: var(--sub-text);
    background:
        radial-gradient(900px 320px at 50% -80px, rgba(245, 197, 66, 0.28), transparent 70%),
        radial-gradient(600px 400px at 100% 100%, rgba(80, 110, 255, 0.07), transparent 70%),
        linear-gradient(160deg, #fffdf6 0%, #ffffff 55%, #f7f9fd 100%);
    border: 1px solid #f0e2b6;
    box-shadow: 0 4px 24px rgba(168, 116, 0, 0.08);
    box-sizing: border-box;
    overflow: hidden;
    font-family: system-ui, sans-serif;
}

/* Faint grid — the "futuristic" texture, masked so it fades out towards the bottom. */
.sub-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(168, 116, 0, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 116, 0, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 60%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 60%);
    pointer-events: none;
}

.sub-stage > * {
    position: relative;
}

/* ---- Hero ---- */
.sub-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.sub-hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sub-crown-ring {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(245, 197, 66, 0.22), rgba(245, 197, 66, 0.04) 70%);
    border: 1px solid rgba(245, 197, 66, 0.45);
    box-shadow: 0 0 28px rgba(245, 197, 66, 0.35), inset 0 0 18px rgba(245, 197, 66, 0.18);
    animation: sub-pulse 3.2s ease-in-out infinite;
}

.sub-crown {
    filter: drop-shadow(0 0 6px rgba(245, 197, 66, 0.7));
}

@keyframes sub-pulse {
    0%, 100% { box-shadow: 0 0 22px rgba(245, 197, 66, 0.28), inset 0 0 18px rgba(245, 197, 66, 0.15); }
    50%      { box-shadow: 0 0 38px rgba(245, 197, 66, 0.5),  inset 0 0 22px rgba(245, 197, 66, 0.25); }
}

.sub-title {
    margin: 0 0 2px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--sub-text);
}

.sub-title span {
    background: linear-gradient(90deg, #e0a800, #c98a00, #a87400);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sub-tagline {
    margin: 0;
    font-size: 0.84rem;
    color: var(--sub-muted);
}

.sub-status {
    display: flex;
    align-items: stretch;
    gap: 18px;
    padding: 8px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #efe3bf;
    box-shadow: 0 2px 10px rgba(168, 116, 0, 0.08);
    backdrop-filter: blur(6px);
}

.sub-status-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sub-status-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sub-muted);
}

.sub-status-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--sub-gold-text);
}

.sub-status-bad {
    color: #c62828;
}

.sub-status-warn {
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    color: #b23c00;
    background: #e6510018;
}

.sub-status-sep {
    width: 1px;
    background: #efe3bf;
}

/* ---- Section heading: a label between two gold hairlines ---- */
.sub-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sub-gold-text);
}

.sub-section-head::before,
.sub-section-head::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 197, 66, 0.45), transparent);
}

/* ---- Plan cards ---- */
.sub-grid {
    display: grid;
    /* 4 → 2 → 1, never auto-fit: auto-fit wraps four cards 3 + 1 and strands the 12-month card. */
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1150px) {
    .sub-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 18px;
    }
}

.sub-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e6e9f0;
    box-shadow: 0 2px 10px rgba(30, 36, 51, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sub-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 197, 66, 0.5);
    box-shadow: 0 12px 28px rgba(30, 36, 51, 0.1), 0 0 22px rgba(245, 197, 66, 0.22);
}

/* The 12-month card: a gold gradient border (padding-box/border-box trick) and a standing glow. */
.sub-card.is-featured {
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, #fffaeb, #ffffff) padding-box,
        linear-gradient(140deg, #fff1b8, var(--sub-gold) 40%, var(--sub-gold-2) 70%, rgba(245, 197, 66, 0.2)) border-box;
    box-shadow: 0 8px 30px rgba(245, 197, 66, 0.28);
}

.sub-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    color: #1a1406;
    background: linear-gradient(90deg, #fff1b8, var(--sub-gold), var(--sub-gold-2));
    box-shadow: 0 4px 12px rgba(245, 197, 66, 0.35);
}

.sub-card-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sub-muted);
}

.sub-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 4px;
    margin-top: 6px;
}

.sub-rupee {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--sub-gold-text);
}

.sub-amount {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    color: var(--sub-text);
}

.sub-gst {
    font-size: 0.74rem;
    color: var(--sub-muted);
}

.sub-permonth {
    margin-top: 4px;
    font-size: 0.76rem;
    color: var(--sub-gold-text);
}

.sub-features {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.sub-features li {
    position: relative;
    padding-left: 20px;
    font-size: 0.8rem;
    color: #3a4254;
}

.sub-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 10px;
    height: 5px;
    border-left: 2px solid var(--sub-gold-text);
    border-bottom: 2px solid var(--sub-gold-text);
    transform: rotate(-45deg);
}

.sub-features li.sub-bonus strong {
    color: var(--sub-gold-text);
}

.sub-features li.sub-save {
    color: #1b8a4a;
    font-weight: 600;
}

.sub-features li.sub-save::before {
    border-color: #1b8a4a;
}

.sub-total {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #dde1ea;
    font-size: 0.76rem;
    color: var(--sub-muted);
}

.sub-total > div {
    display: flex;
    justify-content: space-between;
}

.sub-total-final {
    margin-top: 3px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--sub-text);
}

/* ---- Buy ---- */
.sub-buy {
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    height: 34px;
    border: none;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #1a1406;
    background: linear-gradient(90deg, #fff1b8, var(--sub-gold) 45%, var(--sub-gold-2));
    box-shadow: 0 6px 18px rgba(245, 197, 66, 0.28);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sub-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(245, 197, 66, 0.45);
}

/* A light sweep across the button on hover. */
.sub-buy::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.sub-buy:hover::after {
    left: 120%;
}

/* ---- Balance pack ---- */
.sub-pack {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    background:
        linear-gradient(120deg, #fffaeb, #ffffff) padding-box,
        linear-gradient(90deg, rgba(245, 197, 66, 0.8), rgba(245, 197, 66, 0.2), rgba(120, 140, 255, 0.35)) border-box;
}

.sub-pack-info {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 320px;
    min-width: 0;
}

.sub-pack-units {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    color: var(--sub-gold-text);
    background: radial-gradient(circle, rgba(245, 197, 66, 0.16), transparent 70%);
    border: 2px solid rgba(245, 197, 66, 0.55);
    box-shadow: 0 0 22px rgba(245, 197, 66, 0.25);
}

.sub-pack-units small {
    margin-top: 3px;
    font-size: 0.56rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sub-muted);
}

.sub-pack-name {
    font-size: 1.05rem;
    font-weight: 700;
}

.sub-pack-desc {
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--sub-muted);
}

.sub-pack-buy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 190px;
}

/* .sub-total supplies the rows; only the spacing is tighter here, beside the price. */
.sub-pack-total {
    margin-top: 6px;
    padding-top: 6px;
}

/* The one condition a buyer must see before paying for the pack — amber, not muted. */
.sub-pack-cond {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: #8a5a00;
    background: #fff4d6;
    border: 1px solid #f0d58a;
}

.sub-terms {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    background: #ffffffcc;
    border: 1px solid #e6e9f0;
}

.sub-terms-title {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sub-gold-text);
}

/* Two columns: five one-line terms stacked would be the tallest block on a page meant to fit
   one screen. */
.sub-terms ul {
    margin: 6px 0 0;
    padding-left: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 28px;
}

.sub-terms li {
    font-size: 0.75rem;
    color: #3a4254;
}

@media (max-width: 700px) {
    .sub-container,
    .sub-container.sidebar-collapsed {
        left: 0;
    }

    .sub-stage {
        padding: 22px 14px 18px;
    }

    .sub-grid,
    .sub-terms ul {
        grid-template-columns: 1fr;
    }

    .sub-status {
        flex-direction: column;
        gap: 8px;
    }

    .sub-status-sep {
        width: auto;
        height: 1px;
    }

    .sub-pack-buy {
        width: 100%;
    }
}

/* --- Reminder popup (Pages/SubscriptionReminderPopup.razor) ----------------------------------- */
.srm-body {
    width: 440px;
    max-width: 100%;
    font-family: system-ui, sans-serif;
}

.srm-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e2433;
}

.srm-item {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff8e6;
    border: 1px solid #f0d58a;
    border-left: 3px solid #e0a800;
}

.srm-item-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #8a5a00;
}

.srm-item-text {
    margin-top: 3px;
    font-size: 0.8rem;
    color: #3a4254;
}
