/* Bundle widget (bundle-plan) — ADO #124640, SRS Part14 "Bundle".
   Scoped under .bundle-plan-widget. Carousel: 4 full cards + partial 5th on
   desktop, 1 full + partial 2nd on mobile (native scroll-snap, vanilla JS arrows).
   Global font (Unbeatable / UMobile Display) is loaded by the page — inherit it. */

.bundle-plan-widget {
    padding: 56px 0;
    overflow: hidden;
}

.bundle-plan-widget .bp-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── header ── */
.bundle-plan-widget .bp-header {
    text-align: center;
    margin-bottom: 32px;
}

.bundle-plan-widget .bp-title {
    margin: 0 0 12px;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 700;
    color: #222;
}

.bundle-plan-widget .bp-subtitle {
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
    color: #555;
}

/* ── carousel ── */
.bundle-plan-widget .bp-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;
}

.bundle-plan-widget .bp-viewport::-webkit-scrollbar {
    display: none;                  /* Chrome/Safari */
}

/* AB#142585 — mouse drag (widget-mouse-drag-scroll.js). Grab cursor only for a fine pointer and
   only while the viewport overflows (.is-drag-scrollable is set by the helper). */
@media (hover: hover) and (pointer: fine) {
    .bundle-plan-widget .bp-viewport.is-drag-scrollable {
        cursor: grab;
    }

    .bundle-plan-widget .bp-viewport.bp-viewport--dragging,
    .bundle-plan-widget .bp-viewport.bp-viewport--dragging * {
        cursor: grabbing;
        user-select: none;
    }
}

.bundle-plan-widget .bp-track {
    display: flex;
    align-items: stretch;
    gap: 20px;
}

/* 4 full cards + partial 5th (≈4.4 visible) */
.bundle-plan-widget .bp-card {
    flex: 0 0 calc((100% - 4 * 20px) / 4.4);
    min-width: 0;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    padding: 24px 20px;
    box-sizing: border-box;
    overflow-wrap: anywhere;        /* editor-entered unbroken strings (AAAA…) must wrap
                                       inside the card, never widen it (AB#133547);
                                       inherits into name/price/keylabel/check-text/accordion */
}

/* ── card content — plan name + price block are centred in the card (P14 mock) ── */
.bundle-plan-widget .bp-name {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    color: #222;
    text-align: center;
}

.bundle-plan-widget .bp-price {
    margin-bottom: 12px;
    color: #222;
    line-height: 1.3;
    text-align: center;
}

.bundle-plan-widget .bp-price s,
.bundle-plan-widget .bp-price del {
    color: #888;
}

.bundle-plan-widget .bp-price strong,
.bundle-plan-widget .bp-price b {
    font-size: 28px;
    line-height: 1.1;
}

.bundle-plan-widget .bp-image {
    padding: 8px 0;
    margin-bottom: 12px;
}

.bundle-plan-widget .bp-image img {
    display: block;
    width: 100%;
    max-width: 254px;
    height: auto;
    max-height: 94px;
    object-fit: contain;
    border-radius: 4px;
}

.bundle-plan-widget .bp-keylabel {
    font-weight: 600;
    font-size: 14px;
    color: #222;
    margin-bottom: 8px;
}

.bundle-plan-widget .bp-checklist {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.bundle-plan-widget .bp-check-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.45;
    color: #333;
}

.bundle-plan-widget .bp-check-icon {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    object-fit: contain;
    color: #FF7300;
}

.bundle-plan-widget .bp-check-text {
    min-width: 0;
}

/* P14 mock: orange + bold, NO underline (site-wide anchor underline is reset here). */
.bundle-plan-widget .bp-popup-link {
    color: #FF7300;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.bundle-plan-widget .bp-popup-link:hover {
    text-decoration: none;
}

/* ── CTA buttons — stacked, full card width, max 3 ── */
.bundle-plan-widget .bp-ctas {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;               /* push CTAs to a consistent bottom zone */
    padding-top: 8px;
}

.bundle-plan-widget .bp-cta {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    border-radius: 24px;
    text-align: center;
    font-size: 16px;
    line-height: 24px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s;
}

.bundle-plan-widget .bp-cta:hover {
    opacity: 0.85;
    text-decoration: none;
}

.bundle-plan-widget .bp-cta--orange {
    background: #FF7300;
    border: 1px solid #FF7300;
    color: #fff;
}

.bundle-plan-widget .bp-cta--white {
    background: #fff;
    border: 1px solid #FF7300;
    color: #FF7300;
}

/* ── T&C accordion — per-card independent state ── */
.bundle-plan-widget .bp-acc {
    border-top: 1px solid #e6e6e6;
    margin-top: 16px;
}

.bundle-plan-widget .bp-acc-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px 0 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    text-align: left;
}

.bundle-plan-widget .bp-acc-chevron {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.bundle-plan-widget .bp-acc.is-open .bp-acc-chevron {
    transform: rotate(180deg);
}

.bundle-plan-widget .bp-acc-panel {
    padding: 8px 0 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

/* ── nav arrows — white circle with orange outline + orange icon, below-right ── */
/* AB#160289 — nav row and arrows match the Plan Card widget (.plan-nav, Figma "Pagination" 22002:31426):
   36px white circle, #FFC58A ring + #FF7300 arrow, 26px under the cards. */
.bundle-plan-widget .bp-nav {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
}

.bundle-plan-widget .bp-nav.is-hidden {
    display: none;                  /* all cards fit — no overflow */
}

.bundle-plan-widget .bp-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #FFC58A;
    background: #fff;
    color: #FF7300;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    padding: 0;
    /* No double-tap-to-zoom on the arrow (AB#139714). */
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

/* AB#160289 (QC 16/11) — as the Plan Card arrows RENDER on the page, not as its stylesheet reads: Swiper's
   bundle CSS (.swiper-button-prev svg {width:100%;height:100%}) stretches Plan Card's 16px icon to fill the
   circle (34px inside the 1px ring), and Swiper never puts .swiper-button-disabled on those buttons, so
   Plan Card's ← at the first card stays orange. The Bundle arrows do the same: the icon fills the circle and
   an end arrow keeps its colours (it still does nothing — the button is disabled, cursor default). */
.bundle-plan-widget .bp-arrow svg {
    width: 100%;
    height: 100%;
}

.bundle-plan-widget .bp-arrow:disabled {
    cursor: default;
}

/* ── country-popup modal (iframe) ── */
.bundle-plan-widget .bp-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.bundle-plan-widget .bp-modal[hidden] {
    display: none;
}

.bundle-plan-widget .bp-modal-dialog {
    position: relative;
    width: min(960px, 100%);
    height: min(80vh, 720px);
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.bundle-plan-widget .bp-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1;
    padding: 0;
}

.bundle-plan-widget .bp-modal-close svg {
    width: 18px;
    height: 18px;
}

.bundle-plan-widget .bp-modal-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

body.bp-modal-open {
    overflow: hidden;
}

/* ── responsive ── */
@media (max-width: 1023px) {
    /* tablet: 2 full + partial 3rd */
    .bundle-plan-widget .bp-card {
        flex-basis: calc((100% - 2 * 20px) / 2.4);
    }
}

@media (max-width: 767px) {
    .bundle-plan-widget {
        padding: 40px 0;
    }

    .bundle-plan-widget .bp-inner {
        padding: 0 18px;
    }

    .bundle-plan-widget .bp-title {
        font-size: 28px;
    }

    .bundle-plan-widget .bp-subtitle {
        font-size: 15px;
    }

    /* mobile: 1 full card + partial 2nd */
    .bundle-plan-widget .bp-track {
        gap: 16px;
    }

    .bundle-plan-widget .bp-card {
        flex-basis: calc((100% - 16px) / 1.15);
    }

    .bundle-plan-widget .bp-nav {
        margin-top: 18px;
    }

    .bundle-plan-widget .bp-arrow {
        width: 36px;
        height: 36px;
    }
}

/* ── category / subcategory tabs (AB#146700) ──
   Same class names as the other tabbed widgets (widget-cat-tabs / widget-cat-underline-tabs /
   widget-cat-tab-panel / widget-cat-sub-content), scoped under .bundle-plan-widget so the widget
   ships one stylesheet. Level 1 = centred pill bar, level 2 = centred underline bar. */
.bundle-plan-widget .widget-cat-tabs,
.bundle-plan-widget .widget-cat-underline-tabs {
    margin-bottom: 24px;
    text-align: center;
}

.bundle-plan-widget .widget-cat-tabs button {
    margin: 0 6px 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    background: #eee;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.bundle-plan-widget .widget-cat-tabs button.active {
    color: #fff;
    background: #FF7300;
}

/* AB#160289 — the Tab Line of the Plan Card widget (.underline-tabs, Figma Tab Line): 16/24 labels, inactive
   500 #4D4D4D, active 600 #FF7300 with a 2px #E86900 line on a 1px #E6E6E6 divider; centred by default,
   full width and left-aligned for "underline-left" (.is-left), like Plan Card's "Free Global Roaming". */
.bundle-plan-widget .widget-cat-underline-tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 24px;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 30px;
    text-align: left;
    overflow-x: auto;
    scrollbar-width: none;
    box-sizing: border-box;
    background: linear-gradient(#E6E6E6, #E6E6E6) left bottom / 100% 1px no-repeat;
}

.bundle-plan-widget .widget-cat-underline-tabs::-webkit-scrollbar {
    display: none;
}

.bundle-plan-widget .widget-cat-underline-tabs.is-left {
    width: 100%;
    justify-content: flex-start;
}

.bundle-plan-widget .widget-cat-underline-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
    margin: 0;
    padding: 8px 16px 12px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: #4D4D4D;
    background: none;
    border: none;
    cursor: pointer;
}

.bundle-plan-widget .widget-cat-underline-tabs button.active {
    color: #FF7300;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 #E86900;
}

@media (hover: hover) {
    .bundle-plan-widget .widget-cat-underline-tabs button:not(.active):hover {
        box-shadow: inset 0 -2px 0 #FF9C40;
    }
}

.bundle-plan-widget .widget-cat-underline-tabs button:focus-visible {
    outline: 2px solid #E86900;
    outline-offset: -2px;
}

.bundle-plan-widget .widget-cat-tab-panel,
.bundle-plan-widget .widget-cat-sub-content {
    display: none;
}

.bundle-plan-widget .widget-cat-tab-panel.active,
.bundle-plan-widget .widget-cat-sub-content.active {
    display: block;
}

@media (max-width: 767px) {
    .bundle-plan-widget .widget-cat-underline-tabs {
        gap: 18px;
    }
}
