/* =====================================================
   ExtraTV Package Details — style.css  v5.0.0
   Tab-driven cinematic panel + compare system.
   Visual source of truth: latest HTML design.
   Cleanup: dropped V5/V5.5/V5.6/V7/V7.1/V8/V8.2/V8.3/V8.3.1
   patch layers; single coherent stylesheet.
   ===================================================== */

.extratv-pd-wrapper.etpd-v5,
.extratv-pd-wrapper.etpd-v5 *,
.etpd-compare-bar,
.etpd-compare-bar * {
    box-sizing: border-box;
}

.extratv-pd-wrapper.etpd-v5 {
    --accent: #d946ef;
    --shadow: rgba(217, 70, 239, .30);
    --glow:   rgba(217, 70, 239, .18);
    --border: rgba(217, 70, 239, .42);
    --iconbg: rgba(217, 70, 239, .14);

    --bg-base: #060617;
    --text:    #e8e8f5;
    --muted:   #b2b2c2;
    --line:    rgba(255, 255, 255, .075);

    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 16px 120px;
    color: var(--text);
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    background:
        radial-gradient(circle at 50% -12%, rgba(255, 0, 180, .15), transparent 34%),
        radial-gradient(circle at 10% 16%, rgba(34, 211, 238, .08), transparent 26%),
        radial-gradient(circle at 90% 18%, rgba(168, 85, 247, .08), transparent 28%),
        var(--bg-base);
    border-radius: 28px;
    direction: rtl;
}

/* ══════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════ */
.etpd-tabs-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 0 auto 18px;
    padding: 12px 8px 14px;
    background: linear-gradient(180deg, rgba(6, 6, 23, .96), rgba(6, 6, 23, .78), rgba(6, 6, 23, 0));
    backdrop-filter: blur(10px);
}

.etpd-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.etpd-tab {
    flex: 0 1 200px;
    min-width: 170px;
    max-width: 220px;
    min-height: 60px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 999px;
    color: #d7d7e5;
    font-weight: 900;
    font-family: inherit;
    font-size: .9rem;
    cursor: pointer;
    overflow: hidden;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease,
        background .22s ease,
        opacity .22s ease;
}

.etpd-tab:hover {
    transform: translateY(-1px);
}

.etpd-tab.active {
    color: #fff;
    border-color: var(--accent);
    background: rgba(255, 255, 255, .065);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .22), 0 0 10px var(--shadow);
}

.etpd-tab-logo {
    width: 150px;
    height: 42px;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, .10));
}

.etpd-tab-fallback {
    text-transform: uppercase;
    letter-spacing: .35px;
    font-weight: 950;
    color: inherit;
}

/* ══════════════════════════════════════════════════
   PANEL
   ══════════════════════════════════════════════════ */
.etpd-panel {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    border-radius: 30px;
    padding: 22px 20px 24px;
    background:
        radial-gradient(circle at 80% 0%, var(--glow), transparent 38%),
        linear-gradient(180deg, #15152f, #09091d);
    border: 1px solid var(--border);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .40), 0 0 12px var(--shadow);
    transition:
        opacity .25s ease,
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
    overflow: hidden;
}

.etpd-panel.is-switching .etpd-panel-inner {
    opacity: .25;
    transform: translateY(6px) scale(.996);
}

.etpd-panel.is-selected {
    border-color: var(--accent);
    box-shadow:
        0 16px 42px rgba(0, 0, 0, .42),
        0 0 0 1px var(--accent),
        0 0 20px var(--shadow);
}

.etpd-panel.is-selected::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 0%, var(--glow), transparent 44%);
    opacity: .46;
}

.etpd-panel-inner {
    position: relative;
    z-index: 1;
    transition: opacity .2s ease, transform .2s ease;
}

@keyframes etpdPanelIn {
    from { opacity: 0; transform: translateY(8px) scale(.992); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.etpd-panel-inner.is-fresh {
    animation: etpdPanelIn .32s cubic-bezier(.2, .8, .2, 1) both;
}

/* Back row */
.etpd-back-row {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 14px;
}

.etpd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    border-radius: 999px;
    padding: 7px 13px;
    font-weight: 900;
    font-size: .80rem;
    text-decoration: none;
    box-shadow: 0 5px 13px var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.etpd-back-link:hover {
    transform: translateY(-1px);
}

/* Badge */
.etpd-badge-row {
    text-align: center;
}

.etpd-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .11);
    color: #eee;
    font-weight: 900;
    font-size: .76rem;
    margin-bottom: 12px;
}

/* Logo block */
.etpd-package-logo {
    width: 306px;
    height: 128px;
    margin: 4px auto 18px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .055), transparent 58%),
        radial-gradient(circle at 50% 0%, var(--glow), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, .038), rgba(255, 255, 255, .014));
    border: 1px solid rgba(255, 255, 255, .075);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, .26),
        0 0 9px var(--shadow),
        inset 0 0 9px rgba(255, 255, 255, .01);
    overflow: hidden;
}

.etpd-package-logo img {
    max-width: 86%;
    max-height: 92px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 4px var(--shadow));
}

.etpd-package-logo-fallback {
    font-size: 1.6rem;
    font-weight: 950;
    color: var(--accent);
    letter-spacing: .5px;
}

/* Title (small, since logo carries the name) */
.etpd-title {
    text-align: center;
    margin: 0;
    font-size: 1.7rem;
    font-weight: 950;
    color: var(--accent);
    letter-spacing: -.2px;
}

.etpd-desc {
    text-align: center;
    margin: 12px auto 18px;
    max-width: 520px;
    color: var(--muted);
    line-height: 1.7;
    font-size: .92rem;
}

/* Combo visual (Mix Plus / VIP Plus) */
.etpd-combo-visual {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    max-width: 360px;
    margin: 14px auto 18px;
}

.etpd-combo-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: var(--accent);
}

.etpd-combo-device svg {
    width: 46px;
    height: 46px;
    filter: drop-shadow(0 0 5px currentColor);
}

.etpd-combo-device span {
    color: #e8e8f5;
    font-size: .78rem;
    font-weight: 900;
}

.etpd-combo-plus {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    font-weight: 950;
    color: #fff;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .10);
}

/* Number strip */
.etpd-number-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0 18px;
}

.etpd-number-box {
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 18px;
    padding: 14px 8px 12px;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.etpd-number-box svg {
    width: 30px;
    height: 30px;
    color: var(--accent);
    filter: drop-shadow(0 0 3px var(--shadow));
}

.etpd-number-box strong {
    display: block;
    direction: ltr;
    font-size: 1.32rem;
    line-height: 1.05;
    font-weight: 950;
    color: #fff;
    text-shadow: 0 0 10px var(--shadow);
    letter-spacing: .3px;
}

.etpd-number-box span {
    display: block;
    margin-top: 6px;
    color: #d8d8e8;
    font-size: .85rem;
    font-weight: 850;
}

/* Section title */
.etpd-section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-weight: 950;
    margin: 22px 0 14px;
    font-size: 1.05rem;
}

/* Features list */
.etpd-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.etpd-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: right;
    background: linear-gradient(135deg, rgba(255, 255, 255, .052), rgba(255, 255, 255, .022));
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 16px;
    padding: 12px 13px;
    color: #eef;
    font-size: .9rem;
    line-height: 1.78;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .12);
}

.etpd-feature-check {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    box-shadow: 0 0 10px var(--shadow);
}

.etpd-feature-check svg {
    width: 14px;
    height: 14px;
}

/* Panel actions */
.etpd-panel-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 22px;
}

.etpd-compare-add {
    width: 100%;
    border: 1.5px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    border-radius: 999px;
    padding: 13px 14px;
    font-weight: 950;
    font-family: inherit;
    font-size: .95rem;
    cursor: pointer;
    box-shadow: 0 5px 12px var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.etpd-compare-add:hover {
    transform: translateY(-1px) scale(1.01);
}

.etpd-compare-add.is-active {
    background: linear-gradient(135deg, var(--accent), #ff00b4);
    border-color: transparent;
    box-shadow: 0 8px 20px var(--shadow);
}

@keyframes etpdPulse {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.035); box-shadow: 0 0 0 4px rgba(255, 255, 255, .035), 0 0 22px var(--shadow); }
    100% { transform: scale(1); }
}

.etpd-compare-add.is-pulse {
    animation: etpdPulse .42s ease both;
}

/* ══════════════════════════════════════════════════
   COMPARE BAR (floating)
   ══════════════════════════════════════════════════ */
.etpd-compare-bar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 9999;
    max-width: 860px;
    margin: 0 auto;
    padding: 12px;
    border-radius: 22px;
    background: rgba(10, 10, 28, .92);
    border: 1px solid rgba(255, 0, 180, .25);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .42), 0 0 16px rgba(255, 0, 180, .10);
    backdrop-filter: blur(14px);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    opacity: 0;
    transform: translateY(120%);
    pointer-events: none;
    transition: opacity .28s ease, transform .34s cubic-bezier(.2, .8, .2, 1);
}

.etpd-compare-bar:not([hidden]) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.etpd-compare-bar[hidden] {
    display: flex;
}

.etpd-compare-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 1;
    direction: rtl;
}

.etpd-compare-bar-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    min-width: 0;
}

.etpd-compare-bar-pills::-webkit-scrollbar { display: none; }
.etpd-compare-bar-pills { scrollbar-width: none; }

.etpd-compare-pill {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    color: #fff;
    font-size: .8rem;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(255, 255, 255, .045);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.etpd-compare-pill.is-current {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--shadow);
}

.etpd-compare-pill-x {
    background: transparent;
    border: 0;
    color: #ff00b4;
    font-size: .9rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.etpd-compare-pill-x:hover { color: #fff; }

.etpd-compare-bar-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.etpd-bar-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    color: #fff;
    font-weight: 950;
    font-family: inherit;
    font-size: .85rem;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.etpd-bar-btn:hover {
    transform: translateY(-1px);
}

.etpd-bar-btn--view {
    background: linear-gradient(135deg, #ff00b4, #8b5cf6);
    box-shadow: 0 4px 14px rgba(255, 0, 180, .3);
}

.etpd-bar-btn--clear {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
}

/* ══════════════════════════════════════════════════
   COMPARE SECTION (table)
   ══════════════════════════════════════════════════ */
.etpd-compare-section {
    display: none;
    max-width: 860px;
    margin: 28px auto 0;
    border-radius: 28px;
    padding: 20px;
    background:
        radial-gradient(circle at 80% 0%, rgba(255, 0, 180, .10), transparent 38%),
        linear-gradient(180deg, #12122b, #09091c);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
    scroll-margin-top: 22px;
}

.etpd-compare-section.is-open {
    display: block;
    animation: etpdPanelIn .22s ease both;
}

.etpd-compare-title {
    text-align: center;
    margin: 0 0 6px;
    font-size: 1.45rem;
    font-weight: 950;
    color: #fff;
}

.etpd-compare-sub {
    text-align: center;
    margin: 0 0 16px;
    color: #aaaabb;
    font-size: .88rem;
}

.etpd-compare-table {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
}

.etpd-compare-grid {
    min-width: 560px;
    display: grid;
    grid-template-columns: 160px repeat(var(--cols, 2), 1fr);
}

.etpd-cell {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    border-left: 1px solid rgba(255, 255, 255, .07);
    text-align: center;
    background: rgba(255, 255, 255, .025);
    color: #e9e9f4;
    font-size: .9rem;
}

.etpd-cell.is-head {
    font-weight: 950;
    background: rgba(255, 0, 180, .08);
    color: #fff;
}

.etpd-cell.is-label {
    text-align: right;
    color: #bfc0d1;
    font-weight: 900;
}

.etpd-cell:last-child {
    border-left: 0;
}

.etpd-cell strong {
    color: #fff;
    font-weight: 900;
}

.etpd-compare-back {
    width: 100%;
    margin-top: 14px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    color: #fff;
    padding: 12px;
    border-radius: 999px;
    font-weight: 950;
    font-family: inherit;
    cursor: pointer;
}

.etpd-compare-back:hover {
    background: rgba(255, 255, 255, .08);
}

.etpd-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #888;
    font-size: .95rem;
    border: 1px dashed rgba(255, 255, 255, .1);
    border-radius: 14px;
    margin-top: 24px;
}

.etpd-compare-empty {
    text-align: center;
    color: #aaa;
    font-size: .9rem;
    padding: 12px 0;
}

/* ══════════════════════════════════════════════════
   MOBILE — clean tabs scroll, no snap bugs
   ══════════════════════════════════════════════════ */
@media (max-width: 760px) {
    .extratv-pd-wrapper.etpd-v5 {
        padding: 18px 14px 130px;
        border-radius: 20px;
    }

    .etpd-tabs-wrap {
        margin-left: -14px;
        margin-right: -14px;
        padding: 12px 14px 14px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .etpd-tabs-wrap::-webkit-scrollbar {
        display: none;
    }

    .etpd-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 10px;
        width: max-content;
        min-width: 100%;
        padding: 0;
        direction: rtl;
    }

    .etpd-tab {
        flex: 0 0 140px;
        min-width: 140px;
        max-width: 140px;
        min-height: 56px;
        padding: 9px 12px;
        opacity: .82;
    }

    .etpd-tab.active {
        opacity: 1;
    }

    .etpd-tab-logo {
        width: 110px;
        height: 34px;
    }

    .etpd-panel {
        max-width: 100%;
        padding: 18px 14px 20px;
        border-radius: 26px;
    }

    .etpd-package-logo {
        width: min(232px, 78vw);
        height: 102px;
        border-radius: 24px;
        margin: 4px auto 14px;
    }

    .etpd-package-logo img {
        max-height: 76px;
        max-width: 84%;
    }

    .etpd-title {
        font-size: 1.46rem;
    }

    .etpd-desc {
        font-size: .88rem;
        line-height: 1.72;
    }

    .etpd-number-strip {
        gap: 8px;
    }

    .etpd-number-box {
        padding: 12px 6px 10px;
        border-radius: 16px;
    }

    .etpd-number-box strong {
        font-size: 1.12rem;
    }

    .etpd-number-box span {
        font-size: .76rem;
    }

    .etpd-features li {
        font-size: .86rem;
        line-height: 1.7;
        padding: 11px 12px;
    }

    .etpd-combo-device svg {
        width: 42px;
        height: 42px;
    }

    .etpd-combo-device span {
        font-size: .72rem;
    }

    .etpd-compare-bar {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .etpd-compare-bar-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .etpd-compare-bar-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .etpd-tab {
        flex: 0 0 128px;
        min-width: 128px;
        max-width: 128px;
        min-height: 54px;
    }

    .etpd-tab-logo {
        width: 100px;
        height: 31px;
    }

    .etpd-package-logo {
        width: min(218px, 76vw);
        height: 96px;
    }

    .etpd-package-logo img {
        max-height: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .etpd-panel,
    .etpd-panel-inner,
    .etpd-tab,
    .etpd-compare-add,
    .etpd-bar-btn,
    .etpd-compare-bar,
    .etpd-compare-section.is-open {
        transition: none !important;
        animation: none !important;
    }
}
