/* ── Reset ── */

.pricing-wrap,
.pricing-wrap *,
.pricing-wrap *::before,
.pricing-wrap *::after {
    box-sizing: border-box;
}

.pricing-wrap {
    width: 100%;
    margin: 0 auto;
    padding: 48px 0;
}

/* ── Bundle Cards (primary CTA) ── */

.pricing-wrap .bundle-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.pricing-wrap .bundle-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 8px;
    padding: 28px 24px 24px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s, opacity 0.2s;
    font-family: inherit;
}

.pricing-wrap .bundle-card:hover {
    border-color: #c7c6ff;
    box-shadow: 0 6px 20px rgba(31, 26, 255, 0.08);
    transform: translateY(-2px);
}

.pricing-wrap .bundle-card.active {
    border-color: #1f1aff;
    background: #f6f5ff;
    box-shadow: 0 6px 24px rgba(31, 26, 255, 0.18);
}

.pricing-wrap .bundle-card.dimmed {
    opacity: 0.55;
}

.pricing-wrap .bundle-card.dimmed:hover {
    opacity: 1;
}

.pricing-wrap .bundle-card-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 4px 10px;
    background: #1f1aff;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 6px;
}

.pricing-wrap .bundle-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.pricing-wrap .bundle-card-price {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    font-weight: 800;
    color: #1a1a2e;
    font-size: 36px;
    letter-spacing: -0.02em;
}

.pricing-wrap .bundle-card-price .dollar {
    font-size: 22px;
    font-weight: 700;
}

.pricing-wrap .bundle-card-price .period {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    margin-left: 2px;
}

/* ── Mode switch link ── */

.pricing-wrap .mode-switch {
    text-align: center;
    margin-bottom: 24px;
}

.pricing-wrap .mode-switch-link {
    display: inline-block;
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 1px dotted #c0c0c8;
    padding-bottom: 1px;
    transition: color 0.2s, border-color 0.2s;
}

.pricing-wrap .mode-switch-link[hidden] {
    display: none;
}

.pricing-wrap .mode-switch-link:hover {
    color: #1f1aff;
    border-bottom-color: #1f1aff;
}

/* ── Alerts (column-width, full row of icon + text) ── */

.pricing-wrap .alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

.pricing-wrap .alert[hidden] {
    display: none;
}

.pricing-wrap .alert-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    fill: currentColor;
}

.pricing-wrap .alert-info {
    background: #fffbea;
    border-color: #f5e6a8;
    color: #6b5b1f;
}

.pricing-wrap .alert-warning {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ── Summary Footer (sticky bottom, rejoins flow at end of page) ──
 * Visual background spans full viewport width via a pseudo-element so the
 * inner content stays constrained to the column.
 */

.pricing-wrap .summary-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 32px;
}

.pricing-wrap .summary-footer::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(-50vw + 50%);
    right: calc(-50vw + 50%);
    background: transparent;
    border-top: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    z-index: -1;
}

.pricing-wrap .summary-footer.stuck::before {
    background: #fff;
    border-top-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 24px rgba(15, 17, 40, 0.1), 0 -1px 3px rgba(0, 0, 0, 0.04);
}

.pricing-wrap .summary-footer-sentinel {
    height: 1px;
    width: 100%;
}

.pricing-wrap .summary-footer-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.pricing-wrap .summary-footer-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.pricing-wrap .total-label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}

.pricing-wrap .total-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.pricing-wrap .total-amount .dollar {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.pricing-wrap .total-amount .amount {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.02em;
    transition: opacity 0.15s ease;
}

.pricing-wrap .total-amount .amount.bump {
    opacity: 0.5;
}

.pricing-wrap .total-amount .period {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
}

.pricing-wrap .total-meta {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    width: 100%;
    margin-top: 2px;
}

/* ── Product Cards ── */

.pricing-wrap .product-cards {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.04);
}

.pricing-wrap .product-card {
    background: #fff;
    border-radius: 0;
    border-bottom: 1px solid #f0f0f5;
}

.pricing-wrap .product-card:last-child {
    border-bottom: none;
}

.pricing-wrap .product-top {
    display: flex;
    align-items: center;
    padding: 28px 32px 0;
    gap: 16px;
}

.pricing-wrap .product-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pricing-wrap .product-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.pricing-wrap .product-name-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pricing-wrap .product-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.pricing-wrap .product-learn-more {
    font-size: 13px;
    font-weight: 500;
    color: #c7c6ff;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s;
}

.pricing-wrap .product-learn-more:hover {
    color: #1f1aff;
}

.pricing-wrap .product-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: #9ca3af;
    transition: opacity 0.3s ease;
}

.pricing-wrap .product-subtitle abbr {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: help;
}

/* ── Product Slider ── */

.pricing-wrap .product-slider {
    padding: 20px 32px 20px;
}

.pricing-wrap .slider-row {
    position: relative;
    display: flex;
    align-items: center;
}

.pricing-wrap .product-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
    display: block;
    margin: 0;
    padding: 0;
}

.pricing-wrap .product-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1f1aff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(31, 26, 255, 0.35);
    transition: box-shadow 0.2s;
}

.pricing-wrap .product-slider input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 14px rgba(31, 26, 255, 0.5);
}

.pricing-wrap .product-slider input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #1f1aff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(31, 26, 255, 0.35);
    border: none;
}

.pricing-wrap .slider-track-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 6px;
    background: #1f1aff;
    border-radius: 3px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: width 0.3s ease;
    width: 0;
    z-index: 4;
}

/* Locked slider in bundle mode — full opacity, just a not-allowed cursor */
.pricing-wrap .product-card.locked .product-slider input[type="range"],
.pricing-wrap .product-card.locked .product-slider input[type="range"]::-webkit-slider-thumb,
.pricing-wrap .product-card.locked .product-slider input[type="range"]::-moz-range-thumb {
    cursor: not-allowed;
}

/* ── Feature List ── */

.pricing-wrap .product-features {
    padding: 0 32px 24px;
    transition: opacity 0.25s ease;
}

.pricing-wrap .product-features.fading {
    opacity: 0;
}

.pricing-wrap .product-features:empty,
.pricing-wrap .product-features ul:empty {
    padding: 0;
}

.pricing-wrap .product-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px 20px;
}

.pricing-wrap .product-features li {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 3px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.35;
}

.pricing-wrap .product-features li::before {
    content: '';
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    border-radius: 50%;
    background-color: #eef2ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%231f1aff'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-size: 11px;
    background-repeat: no-repeat;
    background-position: center;
}

/* ── Checkout button (lives inside summary footer) ── */

.pricing-wrap .checkout-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #1f1aff;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, opacity 0.2s;
    box-shadow: 0 4px 14px rgba(31, 26, 255, 0.3);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.pricing-wrap .checkout-btn:hover {
    background: #1714d9;
    box-shadow: 0 4px 20px rgba(31, 26, 255, 0.45);
}

.pricing-wrap .checkout-btn:active {
    background: #110ec0;
}

.pricing-wrap .checkout-btn.disabled {
    background: #cbd5e1;
    color: #f1f5f9;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

/* ── Checkout Mode Transitions ── */

.pricing-wrap .bundle-cards,
.pricing-wrap .mode-switch,
.pricing-wrap .custom-mode-note,
.pricing-wrap .product-cards,
.pricing-wrap .custom-validation,
.pricing-wrap .summary-footer {
    transition: opacity 0.3s ease;
}

/* ── Checkout Form ── */

.pricing-wrap .bundle-builder-form {
    display: none;
    opacity: 0;
    padding: 40px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: opacity 0.3s ease;
}

.pricing-wrap .bundle-builder-back {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.pricing-wrap .bundle-builder-back:hover {
    color: #1f1aff;
}

.pricing-wrap .bundle-builder-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
}

.pricing-wrap .bundle-builder-form-summary {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 32px;
    line-height: 1.5;
}

.pricing-wrap .bundle-builder-form .gchoice label a,
.pricing-wrap .bundle-builder-form .gfield_checkbox label a {
    text-decoration: underline;
}

/* ── Submission Loading Overlay ── */

.pricing-wrap .bb-loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.pricing-wrap .bb-loading-overlay.active {
    display: flex;
}

.pricing-wrap .bb-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #1f1aff;
    border-radius: 50%;
    animation: bb-spin 0.8s linear infinite;
}

@keyframes bb-spin {
    to { transform: rotate(360deg); }
}

.pricing-wrap .bb-loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.pricing-wrap .bb-loading-subtext {
    font-size: 14px;
    color: #6b7280;
    margin-top: -8px;
}

/* ── Responsive ── */

@media (max-width: 1100px) {
    .pricing-wrap .bundle-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .pricing-wrap .product-features ul {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .pricing-wrap .bundle-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .pricing-wrap {
        padding: 24px 12px;
    }

    .pricing-wrap .bundle-card {
        padding: 22px 18px 18px;
    }

    .pricing-wrap .bundle-card-price {
        font-size: 32px;
    }

    .pricing-wrap .product-top {
        padding: 20px 20px 0;
        gap: 12px;
        flex-wrap: wrap;
    }

    .pricing-wrap .product-learn-more {
        width: 100%;
        order: 3;
        margin-top: 4px;
        margin-left: 48px;
    }

    .pricing-wrap .product-icon {
        width: 36px;
        height: 36px;
    }

    .pricing-wrap .product-name {
        font-size: 17px;
    }

    .pricing-wrap .product-slider {
        padding: 16px 20px 16px;
    }

    .pricing-wrap .product-features {
        padding: 0 20px 20px;
    }

    .pricing-wrap .product-features ul {
        grid-template-columns: 1fr;
    }

    .pricing-wrap .summary-footer-inner {
        gap: 12px;
        padding: 12px 0;
    }

    .pricing-wrap .alert {
        padding: 12px 14px;
        font-size: 13px;
    }

    .pricing-wrap .summary-footer-text {
        gap: 8px;
    }

    .pricing-wrap .total-amount .amount {
        font-size: 26px;
    }

    .pricing-wrap .total-amount .dollar {
        font-size: 16px;
    }

    .pricing-wrap .checkout-btn {
        padding: 12px 18px;
        font-size: 14px;
    }

    .pricing-wrap .total-meta {
        font-size: 11px;
    }

    .pricing-wrap .bundle-builder-form {
        padding: 24px 20px;
    }

    .pricing-wrap .bundle-builder-form-title {
        font-size: 20px;
    }

    .pricing-wrap .bundle-builder-back {
        font-size: 14px;
        margin-bottom: 20px;
    }
}
