/**
 * Public TV packages page — [wightman_tv_packages].
 *
 * Reproduces the page the theme used to render from its own post types, so
 * the visual result is unchanged while the content now comes from the
 * plugin's TV Packages and Channels screens.
 *
 * Two constraints shaped this file:
 *  - No Tailwind and no Alpine. The theme has both, but a plugin cannot rely
 *    on a theme's build, so every value below is written out longhand.
 *  - Spacing is gap and padding, never margin between siblings. The active
 *    theme ships `div div { margin-bottom: 0 !important }`, which would
 *    silently flatten any margin used for layout here.
 *
 * Everything is scoped under .wgm-sc so it cannot leak into the theme.
 */

.wgm-sc {
    --sc-ink: #0E0E0E;
    --sc-body: #333333;
    --sc-red: #D02727;
    --sc-red-tint: #FFE1E3;
    --sc-panel: #DFDFDF;
    --sc-inner: #F0F0F0;
    --sc-line: #878787;
    --sc-line-soft: #9E9E9E;
    --sc-radius: 15px;

    /* Inherit the theme's typeface rather than importing one. */
    font-family: inherit;
    color: var(--sc-body);
    box-sizing: border-box;

    /* The shortcode sets its own measure instead of trusting whatever
       container it is dropped into. The theme's own TV page wraps the
       section in a 1200px Genesis Blocks column; a plain page has no such
       wrapper and the section would otherwise run edge to edge.
       Gutters are 24px to match the theme's own, and only apply below
       1248px (1200 + both gutters) so that inside a container that already
       provides them the content still measures a full 1200px. */
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}


/* Opt out with [wightman_tv_packages width="full"] for a full-bleed layout. */
.wgm-sc-full { max-width: none; }

.wgm-sc *,
.wgm-sc *::before,
.wgm-sc *::after { box-sizing: border-box; }

.wgm-sc p,
.wgm-sc h2,
.wgm-sc h3,
.wgm-sc h4,
.wgm-sc ul,
.wgm-sc li { margin: 0; padding: 0; }

.wgm-sc ul { list-style: none; }

/* ---------------------------------------------------------------- header */

.wgm-sc-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: 40px;
    text-align: center;
}

.wgm-sc-head h2 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
    color: #000;
}

.wgm-sc-head p {
    font-size: 18px;
    color: var(--sc-body);
    max-width: 780px;
}

/* ------------------------------------------------------------------ tabs */

.wgm-sc-tabs {
    display: flex;
    gap: 8px;
    padding: 12.5px;
    background: var(--sc-panel);
    border-radius: var(--sc-radius);
    overflow-x: auto;
}

.wgm-sc-tab {
    flex: 1 1 0;
    min-width: fit-content;
    height: 50px;
    padding: 12px 24px;
    background: none;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.wgm-sc-tab[aria-selected="true"] {
    background: var(--sc-ink);
    color: #fff;
}

/* --------------------------------------------------------------- panels */

.wgm-sc-panel {
    padding: 64px 54px;
    background: var(--sc-panel);
    border-radius: var(--sc-radius);
}

.wgm-sc-panels { padding-top: 32px; }

.wgm-sc-panel[hidden] { display: none; }

/* Entrance mirrors the transition the page had before. */
.wgm-sc-panel:not([hidden]) {
    animation: wgm-sc-in .5s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes wgm-sc-in {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ tab: basic */

.wgm-sc-stage {
    display: flex;
    justify-content: center;
    padding: 56px;
    background: var(--sc-inner);
    border-radius: var(--sc-radius);
}

.wgm-sc-stage > * { width: 100%; max-width: 900px; }

/* ------------------------------------------------------------ tab: addon */

.wgm-sc-split { display: flex; gap: 24px; }

.wgm-sc-rail {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 0 0 auto;
    width: 250px;
}

.wgm-sc-rail-item {
    padding: 22px 24px;
    background: #fff;
    border: 0;
    border-radius: var(--sc-radius);
    font-family: inherit;
    font-size: 20px;
    font-weight: 600;
    color: var(--sc-body);
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.wgm-sc-rail-item[aria-selected="true"] {
    background: var(--sc-ink);
    font-weight: 700;
    color: #fff;
}

.wgm-sc-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 32px 40px;
    background: var(--sc-inner);
    border-radius: var(--sc-radius);
}

.wgm-sc-group[hidden] { display: none; }

.wgm-sc-group:not([hidden]) {
    animation: wgm-sc-in .45s cubic-bezier(.16, 1, .3, 1) both;
}

/* ------------------------------------------------------------------ grid */

.wgm-sc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px 24px;
    justify-content: center;
    max-width: 740px;
    margin: 0 auto;
}

.wgm-sc-grid > * { width: 313px; }

/* Full-width layouts (feature card, tier card) ignore the 313px column. */
.wgm-sc-grid-wide { max-width: none; }
.wgm-sc-grid-wide > * { width: 100%; }

/* ------------------------------------------------------------------ card */

.wgm-sc-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--sc-line);
    border-radius: var(--sc-radius);
    overflow: hidden;
}

.wgm-sc-card-head {
    padding: 24px 30px;
    background: var(--sc-ink);
}

.wgm-sc-card-head h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.wgm-sc-card-body {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 32px 19px;
}

.wgm-sc-card-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* The wide feature card puts the tick list and the price side by side. */
.wgm-sc-card-feature .wgm-sc-card-head { padding: 0 24px; height: 75px; display: flex; align-items: center; }
.wgm-sc-card-feature .wgm-sc-card-head h3 { font-size: 23px; font-weight: 600; }
.wgm-sc-card-feature .wgm-sc-card-body { padding: 32px 24px; gap: 16px; }

.wgm-sc-feature-row {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.wgm-sc-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 320px;
}

.wgm-sc-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: var(--sc-body);
}

.wgm-sc-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    background: var(--sc-ink);
    border-radius: 50%;
    color: #fff;
}

/* ----------------------------------------------------------------- price */

.wgm-sc-buy {
    display: flex;
    flex-direction: column;
    gap: 32px;
    flex: 0 0 auto;
}

.wgm-sc-price-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wgm-sc-price-prefix {
    font-size: 20px;
    color: var(--sc-body);
}

.wgm-sc-price {
    font-size: 33px;
    font-weight: 700;
    color: #000;
    line-height: 1.1;
    font-family: "Nunito";
}

.wgm-sc-price span {
    font-size: 20px;
    font-weight: 400;
}

/* A plain card states its price inline rather than in a stacked block. */
.wgm-sc-price-inline {
    font-size: 23px;
    font-weight: 700;
    color: var(--sc-body);
}

.wgm-sc-price-inline span {
    font-size: 16px;
    font-weight: 400;
}

.wgm-sc-desc {
    font-size: 16px;
    color: var(--sc-body);
    line-height: 1.5;
}

/* ---------------------------------------------------------------- button */

.wgm-sc-btn {
    display: inline-block;
    padding: 16px 56px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    text-decoration: none;
    cursor: pointer;

    border: 2px solid #D02727;
    color: #FFF;
    text-decoration: none;
    background: linear-gradient(to bottom, #D02727 50%, #fff 50%);
    background-size: 100% 200%;
    background-position: 0 0;
    transition: background-position 0.2s ease-in-out, color 0.25s ease-in-out;
}

.wgm-sc-btn:hover,
.wgm-sc-btn:focus-visible {
    color: #000 !important;
    background-position: 0 100%;
    border-color: #D02727;
}

.wgm-sc-buy .wgm-sc-btn { align-self: flex-start; }

/* ------------------------------------------------------------ tier chips */

.wgm-sc-tiers {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 16px;
}

.wgm-sc-tier {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 130px;
    height: 130px;
    padding: 8px;
    background: var(--sc-red-tint);
    border: 2px solid var(--sc-red);
    border-radius: var(--sc-radius);
    text-align: left;
}

.wgm-sc-tier-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wgm-sc-tier-count {
    font-size: 18px;
    font-weight: 600;
    color: var(--sc-body);
    line-height: 1.2;
}

.wgm-sc-tier-price {
    font-size: 23px;
    font-weight: 600;
    color: #000;
    line-height: 1.1;
}

.wgm-sc-tier-price span { font-size: 20px; font-weight: 400; }

.wgm-sc-card-tiers .wgm-sc-card-body { padding: 54px; gap: 48px; }

.wgm-sc-tier-row {
    display: flex;
    flex-wrap: wrap-reverse;
    gap: 24px;
}

.wgm-sc-tier-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex: 1 1 380px;
}

.wgm-sc-tier-headline {
    font-size: 27px;
    font-weight: 700;
    color: #000;
    font-family: "Nunito";
    line-height: 1.25;
}

/* ----------------------------------------------------------- logo strip */

.wgm-sc-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.wgm-sc-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 126px;
    height: 126px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--sc-line-soft);
    border-radius: 10px;
    overflow: hidden;
}

.wgm-sc-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* A channel with no artwork yet still has to occupy its tile. */
.wgm-sc-logo-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--sc-body);
    text-align: center;
    word-break: break-word;
}

.wgm-sc-logo[hidden] { display: none; }

.wgm-sc-seeall {
    align-self: flex-start;
    padding: 0;
    background: none;
    border: 0;
    font-family: inherit;
    font-size: 16px;
    color: var(--sc-body);
    text-decoration: underline;
    cursor: pointer;
}

.wgm-sc-seeall:hover { color: var(--sc-red); }

/* --------------------------------------------------------- tab: connect */

.wgm-sc-connect {
    display: flex;
    justify-content: center;
    padding: 56px;
    background: #fff;
    border-radius: var(--sc-radius);
}

.wgm-sc-connect-inner {
    display: flex;
    gap: 10px;
    align-items: stretch;
    max-width: 934px;
    width: 100%;
}

.wgm-sc-connect-media {
    flex: 1 1 0;
    border-radius: var(--sc-radius);
}

.wgm-sc-connect-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wgm-sc-connect-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    flex: 1 1 0;
    padding: 0 56px;
}

.wgm-sc-connect-body h3 {
    font-size: 33px;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
}

.wgm-sc-connect-body p { font-size: 18px; color: var(--sc-body); line-height: 1.5; }
.wgm-sc-connect-body .wgm-sc-btn { align-self: flex-start; margin-top: 16px; }

/* ------------------------------------------------------------ empty state */

.wgm-sc-empty {
    padding: 40px;
    background: #fff;
    border-radius: var(--sc-radius);
    font-size: 16px;
    color: var(--sc-body);
    text-align: center;
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1100px) {
    .wgm-sc-stage { padding: 0; background-color: transparent; }
    .wgm-sc-grid { max-width: none; }
}

@media (max-width: 900px) {
    .wgm-sc-head h2 { font-size: 34px; }
    .wgm-sc-head p { font-size: 16px; }

    .wgm-sc-split { flex-direction: column; }

    .wgm-sc-rail {
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 4px;
        /* Keep the rail swipeable rather than squeezing every label. */
        scrollbar-width: thin;
    }

    .wgm-sc-rail-item {
        flex: 0 0 auto;
        padding: 14px 20px;
        font-size: 16px;
        white-space: nowrap;
    }

    .wgm-sc-content { padding: 0; background-color: transparent; }
    .wgm-sc-card-tiers .wgm-sc-card-body { padding: 28px 20px; gap: 32px; }

    .wgm-sc-connect { padding: 0; }
    .wgm-sc-connect-inner { flex-direction: column; gap: 24px; }
    .wgm-sc-connect-body { padding: 0; }
    .wgm-sc-connect-body h3 { font-size: 24px; }

    .wgm-sc-feature-row { flex-direction: column; }
    .wgm-sc-buy .wgm-sc-btn,
    .wgm-sc-connect-body .wgm-sc-btn { align-self: stretch; }
}

@media (max-width: 600px) {
    .wgm-sc-tier-headline{font-size: 20px;}
    .wgm-sc-panel { padding:0; background-color: transparent; }
    .wgm-sc-tabs { padding: 8px; gap: 4px; }
    .wgm-sc-tab { height: 44px; padding: 8px 14px; font-size: 18px; }

    .wgm-sc-grid { gap: 24px 16px; }
    .wgm-sc-grid > * { width: 100%; }

    .wgm-sc-logo {width: 115px; height: 115px; }
    .wgm-sc-tier { width: 100%; }
    .wgm-sc-tier-count { font-size: 20px; }
    .wgm-sc-tier-price { font-size: 23px; }
    .wgm-sc-tier-price span { font-size: 16px; }

    .wgm-sc-price { font-size: 23px; }
    .wgm-sc-btn { padding: 14px 24px; }
    .wgm-sc-panels .wgm-sc-feature-row .wgm-sc-features{order: 2;}
    .wgm-sc-buy
}

@media (prefers-reduced-motion: reduce) {
    .wgm-sc-panel:not([hidden]),
    .wgm-sc-group:not([hidden]) { animation: none; }
    .wgm-sc-tab,
    .wgm-sc-rail-item,
    .wgm-sc-btn { transition: none; }
}


/* Pager is hidden everywhere except mobile */
.wgm-sc-pager { display: none; }

@media (max-width: 767px) {

  /* Hide the pill rail on mobile (JS still uses it behind the scenes) */
  .wgm-sc-rail { display: none; }
  .wgm-sc-split { display: block; }
  .wgm-sc-content { width: 100%; }

  /* Title + arrows + dots */
  .wgm-sc-pager {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px !important;
  }
  .wgm-sc-pager-title {
    margin: 0;
    font-size: 23px;
    font-weight: 600;
    text-align: center;
  }
  .wgm-sc-pager-nav {
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .wgm-sc-pager-arrow {
    background: none;
    border: 0;
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #111;
  }
  .wgm-sc-pager-dots {
    display: flex;
    gap: 8px;
  }
  .wgm-sc-pager-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
  }
  .wgm-sc-pager-dot[aria-current="true"] {
    background: #111;
  }
}