/* ==========================================================
   Pricing — fully scoped, immune to global overrides
   ========================================================== */

.pricing {
    /* Local tokens (scoped) */
    --card-bg: rgba(255, 255, 255, .62);
    --card-border: rgba(15, 18, 32, .10);
    --card-blur: 16px;
    --shadow: 0 12px 34px rgba(15, 18, 32, .10);
    --ring: rgba(120, 112, 255, .55);
    --purple-1: #423dfc;
    --purple-2: #7271fb;
    --text: #0f1220;
    --muted: rgba(15, 18, 32, .64);
    --chip: #f1efff;

    padding: clamp(40px, 6vw, 80px) 0;
    isolation: isolate;
}

/* ---------------- Head ---------------- */
.pricing .pricing__head {
    text-align: center;
    margin-bottom: 26px;
}

.pricing .pricing__head h2 {
    font-family: var(--heading-font, Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);
    font-weight: 700;
    line-height: 1.1;
    font-size: clamp(24px, 3.8vw, 36px);
    margin: 0 0 4px;
}

.pricing .pricing__head p {
    color: var(--muted);
    margin: 0 0 14px;
}

/* Billing toggle */
.pricing .billing-toggle {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(99, 102, 241, .08);
}

.pricing .toggle-btn {
    border: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: transparent;
    color: #4f46e5;
    font-weight: 600;
    cursor: pointer;
}

.pricing .toggle-btn.is-active {
    background: #fff;
    box-shadow: 0 4px 14px rgba(79, 70, 229, .18);
}

/* ---------------- Grid ---------------- */
.pricing .pricing__grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
    margin-top: 14px;
}

@media (min-width: 900px) {
    .pricing .pricing__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ---------------- Card ---------------- */
.pricing .plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 22px;
    padding: 20px 18px;
    color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--card-blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--card-blur)) saturate(160%);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .55);
    transition: transform .18s ease, box-shadow .25s ease, border-color .25s ease;
}

.pricing .plan-card:hover {
    transform: translateY(-4px);
    border-color: rgba(66, 77, 254, .22);
    box-shadow: 0 16px 40px rgba(66, 77, 254, .18), inset 0 1px 0 rgba(255, 255, 255, .65);
}

.pricing .plan-card::after {
    content: "";
    position: absolute;
    inset: -16px;
    border-radius: inherit;
    background: radial-gradient(70% 60% at 50% 120%, rgba(66, 77, 254, .18), transparent 70%);
    filter: blur(18px);
    z-index: -1;
    opacity: .5;
    pointer-events: none;
}

/* Head inside card */
.pricing .plan-card__head {
    margin-bottom: 10px;
}

.pricing .plan-name {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--muted);
}

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

.pricing .price .currency {
    font-weight: 700;
}

.pricing .price .amount {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .2px;
}

.pricing .price .per {
    color: var(--muted);
    font-weight: 500;
}

.pricing .price.custom {
    font-weight: 800;
    font-size: 26px;
}

.pricing .billed-pill {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #6b6f85;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(111, 114, 255, .1);
    border: 1px solid rgba(111, 114, 255, .18);
}

/* Meta row under price */
.pricing .plan-meta {
    display: grid;
    grid-auto-rows: min-content;
    gap: 8px;
    padding: 10px 0 6px;
    margin: 0 0 6px;
    list-style: none;
}

.pricing .plan-meta li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.pricing .plan-meta .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8b90ff;
    box-shadow: 0 0 0 3px rgba(139, 144, 255, .18);
}

.pricing .plan-meta .chip {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--chip);
    color: #5b57f6;
    font-size: 12px;
    font-weight: 700;
}

.pricing .plan-meta .unit {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 18, 32, .08);
    font-size: 12px;
    color: #555;
}

/* ---------------- Feature list ---------------- */
.pricing .feature-list {
    list-style: none;
    padding: 10px 0 12px;
    margin: 0;
    display: grid;
    gap: 10px;
}

/* Base row + icon defaults (scoped) */
.pricing .feature-list li {
    position: relative;
    padding-left: 28px;
    font-size: 14px;
    line-height: 1.4;
    color: #21243a;
    /* icon defaults (check + purple) */
    --icon-size: 18px;
    --icon-url: url("/assets/icons/check-circle.svg");
    --icon-color: var(--purple-2, #7271fb);
}

/* Render icon via mask so we can tint it */
@supports((-webkit-mask-image: url("")) or (mask-image: url(""))) {
    .pricing .feature-list li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 2px;
        width: var(--icon-size);
        height: var(--icon-size);
        background-color: var(--icon-color);

        /* WebKit */
        -webkit-mask-image: var(--icon-url);
        -webkit-mask-position: center;
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-size: contain;

        mask-image: var(--icon-url);
        mask-position: center;
        mask-repeat: no-repeat;
        mask-size: contain;
    }
}

/* Fallback: if masks unsupported, just show the SVG as bg (no tint) */
@supports not ((-webkit-mask-image: url("")) or (mask-image: url(""))) {
    .pricing .feature-list li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 2px;
        width: var(--icon-size);
        height: var(--icon-size);
        background: var(--icon-color) no-repeat center / contain;
        /* color has no effect here */
        background-image: var(--icon-url);
        /* shows the icon */
        border-radius: 0;
        /* ensure no leftover circle */
    }
}

/* States */
.pricing .feature-list li.enabled {
    --icon-url: url("/assets/icons/check-circle.svg");
    --icon-color: var(--purple-2, #7271fb);
    color: #162033;
}

.pricing .feature-list li.disabled {
    --icon-url: url("/assets/icons/cross-circle.svg");
    --icon-color: #c9cbd6;
    color: rgba(15, 18, 32, .40);
}

/* Remove any previous bullet styles from older CSS */
.pricing .feature-list li::after {
    content: none;
}

/* ---------------- Footer + buttons ---------------- */
.pricing .plan-card__foot {
    margin-top: auto;
    padding-top: 12px;
}

.pricing .btn-primary,
.pricing .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
}

.pricing .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--purple-1), var(--purple-2));
    box-shadow: 0 0 0 1px var(--ring), 0 16px 34px rgba(66, 77, 254, .25), inset 0 1px 0 rgba(255, 255, 255, .25);
    transition: transform .18s ease, box-shadow .25s ease;
}

.pricing .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px var(--ring), 0 20px 40px rgba(66, 77, 254, .32), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.pricing .btn-secondary {
    color: #3c3f55;
    background: #fff;
    border: 1px solid rgba(15, 18, 32, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

/* ---------------- Badges / variants ---------------- */
.pricing .badge {
    position: absolute;
    top: 10px;
    left: 12px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #4f46e5;
    background: #ffffff;
    border: 1px solid rgba(79, 70, 229, .25);
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(79, 70, 229, .12), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.pricing .badge--hollow {
    color: #6b7190;
    background: transparent;
    border: 1px dashed rgba(15, 18, 32, .28);
}

.pricing .plan-card--best {
    outline: 2px solid rgba(79, 70, 229, .35);
    box-shadow: 0 16px 50px rgba(66, 77, 254, .22), inset 0 1px 0 rgba(255, 255, 255, .65);
}

.pricing .plan-card--current .btn-primary {
    background: linear-gradient(135deg, #cbd1ff, #a6afff);
    color: #19214a;
}

.pricing .plan-card--enterprise {
    background: rgba(255, 255, 255, .7);
}

/* ---------------- Add-on Slider ---------------- */
.pricing .addon {
    margin-top: 24px;
    padding: 16px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(var(--card-blur)) saturate(160%);
    -webkit-backdrop-filter: blur(var(--card-blur)) saturate(160%);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.pricing .addon__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pricing .addon__title {
    font-weight: 700;
    color: #1b1f35;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing .addon__price {
    font-weight: 700;
    color: #4f46e5;
}

.pricing .range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(79, 70, 229, .18), rgba(114, 113, 251, .28));
    border-radius: 999px;
    outline: none;
    border: 1px solid rgba(15, 18, 32, .08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.pricing .range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-1), var(--purple-2));
    box-shadow: 0 0 0 3px rgba(114, 113, 251, .25), 0 8px 16px rgba(66, 77, 254, .25), inset 0 1px 0 rgba(255, 255, 255, .6);
    border: 0;
    cursor: pointer;
}

.pricing .range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-1), var(--purple-2));
    box-shadow: 0 0 0 3px rgba(114, 113, 251, .25), 0 8px 16px rgba(66, 77, 254, .25), inset 0 1px 0 rgba(255, 255, 255, .6);
    border: 0;
    cursor: pointer;
}

.pricing .range-meta {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}

.pricing .addon__footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pricing .addon .note {
    color: var(--muted);
    font-size: 14px;
}

.pricing .addon .chip {
    background: #ffffff;
    border: 1px solid rgba(15, 18, 32, .12);
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
    color: #4f46e5;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {

    .pricing .plan-card,
    .pricing .btn-primary {
        transition: none;
    }
}

/* Align "FREE" on the same line as the AI credits row */
.pricing .plan-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    /* text | right-side chips */
    row-gap: 8px;
}

/* By default, meta items go in the left column */
.pricing .plan-meta li {
    grid-column: 1;
    margin: 0;
    /* reset any margins that might push it */
}

/* Place the FREE chip in the right column, same row as the item before it */
.pricing .plan-meta li.chip {
    grid-column: 2;
    align-self: center;
    justify-self: end;
    margin: 0;
    /* override previous margin-left:auto from earlier CSS */
}

/* Keep the €/lead pill on the right column too (own row) */
.pricing .plan-meta li.unit {
    grid-column: 2;
    justify-self: end;
    align-self: center;
}

/* Price row container */
.pricing .price-row {
    display: flex;
    justify-content: space-between;
    /* pushes price left, pill right */
    align-items: baseline;
    flex-wrap: wrap;
    /* allows wrap on very small screens */
    gap: 8px;
}

/* Main price stays bold and big */
.pricing .price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

/* Pill style */
.pricing .unit-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 18, 32, .08);
    font-size: 12px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

/* Badge alignment: put "Most Popular" on the top-right */
.pricing .plan-card .badge {
    left: auto;
    /* reset left positioning */
    right: 12px;
    /* stick to the right */
}