/**
 * pricing.css - Pricing screen (plan-ui-precios #8). Login only: fragment from /api/pricing/view.
 * Reuses wiztype.css: .badge (price pill), .confirm-generate (CTA), option-card gradient border.
 * Scrolls vertically like Library / Videos / Campaigns (approved 12-oct), with generous spacing between blocks.
 * Mobile: plan tabs (one plan at a time, Creator by default), extra pack in one block, costs in 3 small boxes.
 */

/* Scrollable pricing view (same pattern as #view-library) */
#view-pricing.view-section {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
}

#view-pricing::-webkit-scrollbar { width: 4px; }
#view-pricing::-webkit-scrollbar-track { background: transparent; }
#view-pricing::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.35); border-radius: 4px; }

.pr-page {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #fff;
    font-family: 'Inter', sans-serif;
    padding: 40px 40px 100px;
    text-transform: uppercase; /* freshmilk.studio style: all copy in capitals */
}

.pr-list,
.pr-equiv,
.pr-per,
.pr-extra-title,
.pr-extra-desc,
.pr-cost-title,
.pr-cost-desc,
.pr-foot {
    letter-spacing: 0.06em;
}

.pr-wrap {
    width: 100%;
    max-width: 1080px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Monthly / annual: both amounts are rendered, the toggle flips .is-annual */
.pr-page:not(.is-annual) .pr-a,
.pr-page.is-annual .pr-m {
    display: none;
}

.pr-state {
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
}

/* ─ HEADER ─ */
.pr-head {
    text-align: center;
}

.pr-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 34px;
    line-height: 1;
    background: linear-gradient(90deg, #FFFFFF 0%, #999999 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 14px;
}

.pr-sub {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    max-width: 620px;
    line-height: 1.5;
    margin: 0 auto;
}

/* ─ MONTHLY / ANNUAL TOGGLE ─ */
.pr-toggle-wrap {
    display: flex;
    justify-content: center;
}

.pr-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pr-toggle button,
.pr-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.pr-toggle button:hover,
.pr-tabs button:hover {
    color: #fff;
}

.pr-toggle button.active,
.pr-tabs button.active {
    background: #fff;
    color: #000;
}

.pr-save {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 3px 6px;
    border-radius: 4px;
    background: linear-gradient(110deg, rgba(130, 190, 255, 0.25), rgba(255, 150, 190, 0.25));
    color: #fff;
}

.pr-toggle button.active .pr-save {
    color: #000;
    background: linear-gradient(110deg, rgba(130, 190, 255, 0.55), rgba(255, 150, 190, 0.55));
}

/* Plan tabs: mobile only */
.pr-tabs {
    display: none;
}

/* ─ PLAN CARDS ─ */
.pr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
    margin-top: 12px;
}

.pr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px 24px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.pr-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 24px rgba(130, 190, 255, 0.08);
    transform: translateY(-2px);
}

/* Featured: animated pastel border (same as .option-card::before) */
.pr-card.featured {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.04);
}

.pr-card.featured::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(110deg, rgba(130, 190, 255, 0.6) 30%, rgba(255, 150, 190, 0.6) 70%);
    background-size: 200% 200%;
    animation: directorPastel 4s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.pr-ribbon {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: #0a0a0a;
    white-space: nowrap;
}

.pr-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 28px;
    line-height: 0.9;
    background: linear-gradient(90deg, #FFFFFF 0%, #999999 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pr-price-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pr-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pr-amount {
    font-weight: 800;
    font-size: 40px;
    letter-spacing: -0.02em;
    line-height: 1;
}

.pr-per {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}

.pr-equiv {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    min-height: 14px;
}

.pr-credits {
    align-self: flex-start;
}

.pr-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
}

.pr-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.pr-list li::before {
    content: '';
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    border-radius: 4px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat,
        linear-gradient(110deg, rgba(130, 190, 255, 0.3), rgba(255, 150, 190, 0.3));
}

.pr-page .confirm-generate {
    height: 46px;
    padding-top: 0;
    padding-bottom: 0;
}

.pr-card .confirm-generate {
    margin-top: auto;
}

.pr-arrow {
    margin-left: 6px;
}

/* Secondary CTA: same shape as .confirm-generate, outlined */
.confirm-generate.pr-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

.confirm-generate.pr-ghost::before {
    display: none;
}

.confirm-generate.pr-ghost:hover {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.05);
}

/* ─ EXTRA PACK (only with an active plan) ─ */
.pr-extra {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.pr-extra.is-locked {
    opacity: 0.55;
}

.pr-extra-mark {
    flex-shrink: 0;
    min-width: 150px;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.pr-extra-mark .pr-name {
    font-size: 20px;
}

.pr-extra-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pr-extra-title {
    font-weight: 700;
    font-size: 13px;
}

.pr-extra-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.pr-extra-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pr-extra-price .pr-amount {
    font-size: 24px;
}

.pr-extra .confirm-generate {
    width: 160px;
    flex-shrink: 0;
}

.pr-extra .confirm-generate:disabled {
    cursor: not-allowed;
    pointer-events: none;
}

/* ─ COST PER ACTION ─ */
.pr-section-title {
    margin: 24px 0 -8px;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
}

.pr-costs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pr-cost {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    row-gap: 2px;
    align-items: center;
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.pr-cost-num {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(90deg, #FFFFFF 0%, #999999 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pr-cost-num small {
    font-family: 'Inter', sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-top: 3px;
}

.pr-cost-title {
    font-weight: 700;
    font-size: 12px;
}

.pr-cost-desc {
    font-size: 10px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.5);
}

.pr-foot {
    margin: 0;
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.35);
}

/* ─ MOBILE: plan tabs, one plan at a time ─ */
@media (max-width: 768px) {
    .pr-page {
        padding: 24px 16px 80px;
    }
    .pr-wrap {
        gap: 20px;
    }
    .pr-title {
        font-size: 22px;
        margin-bottom: 10px;
    }
    .pr-sub {
        font-size: 9px;
        line-height: 1.5;
    }
    .pr-toggle button,
    .pr-tabs button {
        padding: 7px 12px;
        font-size: 10px;
    }
    .pr-tabs {
        display: flex;
        justify-content: center;
        gap: 4px;
    }
    .pr-tabs button {
        flex: 1;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    .pr-grid {
        grid-template-columns: 1fr;
        margin-top: 10px;
    }
    .pr-card {
        display: none;
        padding: 22px 18px 18px;
        gap: 14px;
    }
    .pr-card.is-current {
        display: flex;
    }
    .pr-card:hover {
        transform: none;
    }
    .pr-name {
        font-size: 20px;
    }
    .pr-amount {
        font-size: 28px;
    }
    .pr-price-block {
        padding-bottom: 14px;
    }
    .pr-page .confirm-generate {
        height: 44px;
    }
    .pr-list {
        font-size: 11px;
        gap: 8px;
    }
    .pr-extra {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px 12px;
        padding: 18px 16px;
    }
    .pr-extra-mark {
        min-width: 0;
        padding: 0;
        border: none;
    }
    .pr-extra-mark .pr-name {
        font-size: 16px;
    }
    .pr-extra-text {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .pr-extra-title {
        font-size: 11px;
    }
    .pr-extra-desc {
        font-size: 9px;
    }
    .pr-extra-price {
        grid-column: 2;
        grid-row: 1;
    }
    .pr-extra-price .pr-amount {
        font-size: 18px;
    }
    .pr-extra .confirm-generate {
        grid-column: 1 / -1;
        width: 100%;
        height: 40px;
    }
    .pr-section-title {
        font-size: 10px;
    }
    .pr-costs {
        gap: 10px;
    }
    .pr-cost {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 14px 6px;
        row-gap: 6px;
    }
    .pr-cost-num {
        grid-row: auto;
        font-size: 18px;
    }
    .pr-cost-title {
        font-size: 9px;
        line-height: 1.3;
    }
    .pr-cost-desc {
        display: none;
    }
    .pr-foot {
        font-size: 8px;
    }
}
