/* ============================================
   PACKAGE TABLE - Shared
   ============================================ */

.package-table-wrapper,
.mobile-plans-table .package-table-wrapper {
    padding: 10px;
    background: #002B4B;
}

.package-table-wrapper {
    width: 100%;
    margin: 0 auto;
    border-radius: 10px;
    box-sizing: border-box;
}

.package-table-wrapper .package-table {
    display: flex;
    width: 100%;
    margin: 1em 0;
    overflow: hidden;
    border-radius: 4px;
    box-sizing: border-box;
}

.package-table-wrapper .package-table .package-column.hidden {
    display: none;
    flex: 0 0 0;
}

.package-table-wrapper .package-table .package-column:hover,
.mobile-plans-table .package-table-wrapper .package-table .package-column:hover {
    background-color: #004990;
}

.package-table-wrapper .package-table .package-column .package-prompt .btn {
    min-width: auto;
}

/* ============================================
   PACKAGE TABLE - Desktop Layout
   ============================================ */

/* First column (features list) gets 40% */
.package-table-wrapper .package-table .package-column:first-child {
    flex: 0 0 40%;
    max-width: 40%;
    background: transparent;
}

/* All other visible columns split the remaining 60% equally */
.package-table-wrapper .package-table .package-column:not(:first-child) {
    flex: 1 1 0;
    min-width: 0;
}

/* Desktop text colors */
.package-table-wrapper .package-table .package-column:first-child .package-information,
.package-table-wrapper .package-table .package-column:first-child .package-features-table .feature-row,
.package-table-wrapper .package-table .package-column .package-title,
.package-table-wrapper .package-table .package-column .package-price,
.package-table-wrapper .package-table .package-column .package-price-period,
.package-table-wrapper .package-table .package-column .package-features-table .feature-row,
.package-table-wrapper .package-table .package-column .package-features-table .feature-row span a,
.package-terms input[type="radio"] + label,
.ad-package-thumb-container .popup-button {
    color: #fff;
}

/* ============================================
   PACKAGE TABLE - Mobile Layout
   ============================================ */

/* Reset desktop flex rules so columns stack full width */
.mobile-plans-table .package-table-wrapper .package-table .package-column:first-child,
.mobile-plans-table .package-table-wrapper .package-table .package-column:not(:first-child) {
    flex: 1 1 auto;
    width: 100%;
    max-width: unset;
    min-width: unset;
    background: transparent;
}

/* Mobile text colors */
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-information,
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-title,
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-price,
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-price-period,
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row,
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row span,
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table::before,
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row::before {
    color: #fff;
}

.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row span a {
    color: #fff;
    text-decoration: underline;
}

/* Feature row layout, allow info icon to fit */
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row {
    flex-wrap: nowrap;
}

.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row span {
    flex: 1 1 auto;
    max-width: none;
}

.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row .ad-package-thumb-container {
    display: inline-block;
    flex: 0 0 auto;
}

.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row .ad-package-thumb-container .popup-button {
    display: block;
}

/* Fix Font Awesome version mismatch for check marks */
.mobile-plans-table .package-table-wrapper .package-table .package-column .package-features-table .feature-row::before {
    font-family: "FontAwesome";
    font-weight: normal;
}
/* ============================================================
   PACKAGE CARDS - [package_table] shortcode

   The XD file is a 1920px still; these are its proportions
   translated to the web:

   - Column count is media-query driven. Container queries are
     NOT usable here: Oxygen's .ct-section-inner-wrap is a flex
     column with align-items:flex-start, so this wrapper is
     shrink-to-fit, and the size containment that container-type
     brings collapses it to nothing.
   - Type is fluid between rem bounds, so it respects the
     visitor's browser font size and never drops below a
     readable floor or overshoots on a wide card.
   - Fixed UI details from the design - 10px radius, 2px
     border, pill - stay fixed. They are not proportional.
   ============================================================ */

.package-table-wrapper {
    /* Site design tokens (regbc-styles.css :root). Literals are only
       fallbacks in case that stylesheet is ever dequeued. */
    --pk-blue: var(--primary-blue, #004990);      /* headings + price */
    --pk-accent: var(--tertiary-blue, #206599);   /* border, rules, bullets, pill */
    --pk-text: var(--gray-dark, #3F4950);         /* body copy */
    --pk-red: var(--accent-red, #c40035);         /* button */
    --pk-font-heading: var(--font-heading, "Poppins", sans-serif);
    --pk-font-body: var(--font-body, "Inter", sans-serif);
    --pk-weight-regular: var(--font-weight-regular, 400);
    --pk-weight-bold: var(--font-weight-bold, 700);

    --pk-radius: 10px;
    --pk-gap: 1rem;
    /* --shadow-card-xl is already the mock-up's card shadow. The wide
       standalone card takes the deeper dy20/blur15 the design gives it. */
    --pk-shadow: var(--shadow-card-xl, 0 10px 20px rgba(0, 0, 0, 0.3));
    --pk-shadow-wide: 0 20px 30px rgba(0, 0, 0, 0.3);

    /* Fluid between rem bounds. The vw middles are restated per
       column count below, since a card is ~90vw at one-up but
       ~20vw at four-up. Ratios come from the mock-up's 398px card.

       One-up (mobile): body copy is pinned to the site's own body
       size rather than scaling with the card. A full-width card
       would otherwise push it to 18px, 20% larger than every other
       paragraph on the site. */
    --pk-fs-title: clamp(1.5rem, 7vw, 1.875rem);
    --pk-fs-subtitle: clamp(0.9375rem, 4vw, 1.125rem);
    --pk-fs-body: var(--font-size-base, 0.9375rem);
    --pk-fs-pill: clamp(0.6875rem, 3vw, 0.8125rem);
    --pk-pad: clamp(1.125rem, 5vw, 1.5rem);

    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: var(--pk-gap);
    /* Oxygen's inner wrap is align-items:flex-start, so claim the row */
    width: 100%;
    padding: 0;
    background: none;
    /* Oxygen sets text-align:justify on #section-75-85080 - don't inherit it */
    text-align: left;
}

/* Oxygen's .ct-section-inner-wrap is a flex column with
   align-items:flex-start, which leaves its children shrink-to-fit.
   Claim the full row for the element holding .package-table-wrapper. */
.ct-section-inner-wrap > :has(> .package-table-wrapper) {
    align-self: stretch;
    width: 100%;
}

.package-table-wrapper .package-card {
    /* Buttons fill the card; the wide standalone card overrides this
       below so its button matches the mock-up's half-width one. */
    --pk-btn-width: 100%;

    position: relative;
    display: flex;
    flex-direction: column;
    /* One-up: fill the panel. The 25rem cap only applies at four-up,
       where it stops a card exceeding the mock-up's 398px width. */
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
    padding: var(--pk-pad);
    background: #fff;
    border: 2px solid var(--pk-accent);
    border-radius: var(--pk-radius);
    box-shadow: var(--pk-shadow);
    text-align: left;
}

.package-table-wrapper .package-card * {
    box-sizing: border-box;
}

/* Reserve the pill's band on every card in the table so the titles
   line up whether or not a given card carries one. */
.package-table-wrapper:has(.package-promo) .package-card {
    padding-top: calc(var(--pk-pad) + 2rem);
}

/* --- Promo pill (Most Popular / Best Value) ------------------ */

.package-table-wrapper .package-card .package-promo {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    line-height: 0;
}

.package-table-wrapper .package-card .package-promo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    padding: 0 0.875rem;
    background: var(--pk-accent);
    border-radius: 999px;
    color: #fff;
    font-size: var(--pk-fs-pill);
    font-weight: var(--font-weight-medium, 500);
    letter-spacing: 0.04em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- Title / subtitle / price -------------------------------- */

.package-table-wrapper .package-card .package-information {
    margin: 0;
}

.package-table-wrapper .package-card .package-title {
    margin: 0;
    padding: 0;
    color: var(--pk-blue);
    font-family: var(--pk-font-heading);
    font-size: var(--pk-fs-title);
    font-weight: var(--pk-weight-regular);
    letter-spacing: 0.02em;
    line-height: 1.15;
}

.package-table-wrapper .package-card .package-subtitle {
    margin: 0.25em 0 1.5em;
    padding: 0;
    color: var(--pk-text);
    font-family: var(--pk-font-heading);
    font-size: var(--pk-fs-subtitle);
    font-weight: var(--pk-weight-regular);
    letter-spacing: 0.04em;
    line-height: 1.35;
}

.package-table-wrapper .package-card .package-price {
    display: block;
    padding-bottom: 1.25em;
    border-bottom: 1px solid var(--pk-accent);
}

.package-table-wrapper .package-card .package-price-amount {
    display: block;
    color: var(--pk-blue);
    font-family: var(--pk-font-heading);
    font-size: var(--pk-fs-title);
    font-weight: var(--pk-weight-regular);
    letter-spacing: 0.02em;
    line-height: 1.05;
}

.package-table-wrapper .package-card .package-price-period {
    display: block;
    margin-top: 0.4em;
    color: var(--pk-text);
    font-size: var(--pk-fs-body);
    letter-spacing: 0.02em;
    line-height: 1.4;
}

/* --- Feature list -------------------------------------------- */

.package-table-wrapper .package-card .package-features {
    flex: 1 1 auto;
    margin: 1.25em 0 0;
    font-size: var(--pk-fs-body);
}

.package-table-wrapper .package-card .package-features ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.package-table-wrapper .package-card .package-features ul li {
    position: relative;
    margin: 0 0 0.5em;
    padding-left: 1em;
    color: var(--pk-text);
    font-size: inherit;
    letter-spacing: 0.02em;
    line-height: 1.55;
    list-style: none;
}

.package-table-wrapper .package-card .package-features ul li:last-child {
    margin-bottom: 0;
}

.package-table-wrapper .package-card .package-features ul li::before {
    content: "";
    position: absolute;
    top: 0.6em;
    left: 0;
    width: 0.45em;
    height: 0.45em;
    background: var(--pk-accent);
    border-radius: 50%;
}

/* --- Button --------------------------------------------------- */

.package-table-wrapper .package-card .package-prompt {
    margin-top: 1.5rem;
}

/* Box model matches the site's global .btn / .btn-red - Inter 700,
   0.5em/1.5em padding, 1.2 line-height.
   Two deliberate departures: min-width:300px is dropped (a card is
   narrower than that at four-up, so the button fills the card), and
   the global drop shadow is off - the mock-up disables it on buttons
   that sit inside a shadowed card. */
.package-table-wrapper .package-card .package-prompt .package-button,
.package-table-wrapper .package-card .package-prompt a.package-button.btn.btn-red {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--pk-btn-width);
    min-width: 0;
    padding: 0.5em 1.5em;
    background: var(--pk-red);
    border: 1px solid transparent;
    border-radius: var(--pk-radius);
    box-shadow: none;
    color: #fff;
    font-family: var(--pk-font-body);
    font-size: var(--pk-fs-body);
    font-weight: var(--pk-weight-bold);
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
}

.package-table-wrapper .package-card .package-prompt .package-button:hover,
.package-table-wrapper .package-card .package-prompt a.package-button.btn.btn-red:hover {
    background: #a3002c;
    color: #fff;
}

.package-table-wrapper .package-card .package-prompt .package-button:focus-visible {
    outline: 3px solid var(--pk-accent);
    outline-offset: 2px;
}

/* --- Column counts ------------------------------------------- */

@media (min-width: 40em) {
    .package-table-wrapper {
        --pk-fs-title: clamp(1.5rem, 4.4vw, 2.5rem);
        --pk-fs-subtitle: clamp(0.9375rem, 2.4vw, 1.375rem);
        --pk-fs-body: clamp(0.9375rem, 2vw, 1.125rem);
        --pk-fs-pill: clamp(0.6875rem, 1.8vw, 1rem);
        --pk-pad: clamp(1.25rem, 3.4vw, 1.875rem);
    }

    .package-table-wrapper .package-card {
        flex-basis: calc(50% - var(--pk-gap) / 2);
        max-width: calc(50% - var(--pk-gap) / 2);
    }
}

@media (min-width: 64em) {
    .package-table-wrapper {
        --pk-fs-title: clamp(1.5rem, 2.1vw, 2.5rem);
        --pk-fs-subtitle: clamp(0.9375rem, 1.15vw, 1.375rem);
        --pk-fs-body: clamp(0.875rem, 0.95vw, 1.125rem);
        --pk-fs-pill: clamp(0.6875rem, 0.85vw, 1rem);
        --pk-pad: clamp(1.25rem, 1.6vw, 1.875rem);
    }

    .package-table-wrapper .package-card {
        flex-basis: calc(25% - var(--pk-gap) * 3 / 4);
        max-width: 25rem;
    }
}

/* --- Single-package table -------------------------------------
   A table holding one card fills whatever box it is given, so the
   column width is set in Oxygen (e.g. a 2-col grid) rather than
   here. It takes the mock-up's deeper shadow, and its button stays
   at the mock-up's ~half-card width instead of spanning. */

.package-table-wrapper:has(.package-card:only-child) .package-card {
    flex-basis: 100%;
    max-width: none;
    box-shadow: var(--pk-shadow-wide);
}

@media (min-width: 40em) {
    .package-table-wrapper:has(.package-card:only-child) .package-card {
        /* Mock-up: 398px button in an 805px card. Full width below 40em. */
        --pk-btn-width: min(25rem, 50%);
    }
}
