/* ==========================================================================
   Feature table: one rounded, bordered table per section, plus a head table
   (column names) and, on the plans page, a foot table (CTA row) that aren't
   boxed. All of them share the .pricingCompareTable class rather than a
   single ID, since table-layout: fixed + matching column widths is what keeps
   their columns aligned across separate <table> elements. One copy for every
   page that carries it: the plans page ([vizibeat_pricing_table], four
   columns) and the Live Show licenses page ([vizibeat_live_show_licenses],
   two). Each snippet links it as "vb:style/shared/PricingCompare.css", which
   vizibeat-portal.php rewrites to the file's URL
   (vizibeat_snippet_stylesheets()); PricingCompare.js keeps the sticky head's
   height in --pricingCompareHeadH. The plans page's From pills, Resolution
   checker, Buy links and CTA row stay in its own snippet. Tokens from
   Sitewide.css; --pricingSectionGap and --pricingHeadingToContentGap from the
   page's wrapper.
   ========================================================================== */

#pricingCompareWrapper {
    width: 100% !important;
    max-width: 1040px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    position: relative !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    font-family: var(--vb-font-body) !important;
    color: var(--vb-text) !important;
}

/* Hard reset against WP / theme table styling. Also where the shell gets its
   #121212 fill in place of the old transparent (page-bg-showing-through). */
.pricingCompareTable,
.pricingCompareTable thead,
.pricingCompareTable tbody,
.pricingCompareTable tfoot,
.pricingCompareTable tr,
.pricingCompareTable th,
.pricingCompareTable td {
    background: #121212 !important;
    background-color: #121212 !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    margin: 0 !important;
    font-family: inherit !important;
}

/* Defuse any zebra striping the theme might apply */
.pricingCompareTable tbody tr:nth-child(odd) td,
.pricingCompareTable tbody tr:nth-child(even) td {
    background: #121212 !important;
    background-color: #121212 !important;
    background-image: none !important;
}

/* Column widths come from a <colgroup> in each table's markup, not CSS:
   table-layout: fixed only reads a first-row cell's width when that cell
   doesn't span columns, and every section table's first row is the
   colspan divider — a colgroup is the one source immune to that. */
.pricingCompareTable {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 15px !important;
    color: #ffffff !important;
}
/* Unboxed: no panel fill on the table shell itself, unlike the sections.
   The thead/tfoot/tr overrides are needed too, or the #121212 hard reset
   above wins on specificity and repaints the row. */
.pricingCompareHeadTable,
.pricingCompareFootTable,
.pricingCompareHeadTable thead,
.pricingCompareHeadTable tr,
.pricingCompareFootTable tfoot,
.pricingCompareFootTable tr {
    background: transparent !important;
    background-color: transparent !important;
}
/* The theme's body wrapper is overflow: hidden, which makes it the sticky
   containing block and kills viewport pinning. clip keeps the exact same
   clipping without creating a scroll container. Scoped to this page by
   living in this snippet. */
.apzo-body-outer-wrapper {
    overflow: clip !important;
}
/* ---- Sticky tier header + section bands ---- The head table pins to the
   viewport top for the whole comparison scroll; each section's title row pins
   1px under it (the overlap avoids a seam if the measured height lands on a
   subpixel). --pricingCompareHeadH is set from JS since the head's height
   varies with breakpoint. The head must re-declare an opaque bg here (after
   the unboxed rule above) or rows would show through it while pinned. */
.pricingCompareHeadTable {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    padding-top: 14px !important;
    background: var(--vb-bg) !important;
    background-color: var(--vb-bg) !important;
}
.pricingCompareSectionTable tbody tr.pricingCompareSectionRow td {
    position: sticky !important;
    top: calc(var(--pricingCompareHeadH, 120px) - 1px) !important;
    z-index: 10 !important;
}
/* ---- Section panels — the rounded box per feature group ---- */
.pricingCompareSectionTable {
    margin-bottom: 12px !important;
    border: 1px solid var(--vb-line) !important;
    border-radius: var(--vb-radius-card) !important;
    background-color: #121212 !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 62%) !important;
}
/* Cells go transparent so the panel's gradient shows through. Later rules
   re-opaque the section band (it must cover rows while pinned) and keep the
   row-hover tint. nth-child matches the zebra-defuse reset's specificity. */
.pricingCompareSectionTable tbody tr:nth-child(odd) td,
.pricingCompareSectionTable tbody tr:nth-child(even) td {
    background: transparent !important;
    background-color: transparent !important;
}
/* Corner cells carry the radius themselves. The panel can't clip them with
   overflow: hidden, or it would also cut off the info tooltip. */
.pricingCompareSectionTable tbody tr:first-child td {
    border-top-left-radius: var(--vb-radius-card) !important;
    border-top-right-radius: var(--vb-radius-card) !important;
}
.pricingCompareSectionTable tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--vb-radius-card) !important;
}
.pricingCompareSectionTable tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--vb-radius-card) !important;
}

/* ---- Header row ---- No panel fill: unlike the section tables, the head
       and foot tables stay unboxed. */
.pricingCompareTable thead tr {
    background: transparent !important;
    background-color: transparent !important;
}
.pricingCompareTable thead th {
    padding: 0 0 24px 0 !important;
    text-align: center !important;
    vertical-align: top !important;
    border-bottom: none !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    font-weight: 400 !important;
    position: relative !important;
}
.pricingCompareTable thead th:first-child {
    text-align: left !important;
    vertical-align: middle !important;
}

.pricingCompareHead {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
}
.pricingCompareTierName {
    font-family: var(--vb-font-body) !important;
    font-size: 38px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
    color: #ffffff !important;
}

/* ---- Body rows ---- */
.pricingCompareTable tbody td {
    padding: 12px 18px !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #ffffff !important;
    font-family: var(--vb-font-body) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    border-bottom: 1px solid var(--vb-line) !important;
    line-height: 1.4 !important;
    background: var(--vb-surface) !important;
    background-color: var(--vb-surface) !important;
}
.pricingCompareTable tbody td:first-child {
    text-align: left !important;
    color: #ffffff !important;
    font-weight: 400 !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
}
.pricingCompareTable tbody tr:last-child td {
    border-bottom: none !important;
}

.pricingCompareTable tbody tr:hover td {
    background: rgba(255, 255, 255, 0.025) !important;
    background-color: rgba(255, 255, 255, 0.025) !important;
}

.pricingFeatureNote {
    display: block !important;
    margin: 3px 0 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--vb-text-dim) !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
}
.pricingCompareTable tbody tr.pricingCompareSectionRow:hover td {
    background-color: var(--vb-surface-2) !important;
}

/* ---- Inline info marker + hover/focus tooltip (e.g. stem separation) ---- */
.pricingInfo {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
    border: 1px solid var(--vb-line-strong) !important;
    border-radius: var(--vb-radius-chip) !important;
    color: var(--vb-text-dim) !important;
    font-family: var(--vb-font-body) !important;
    font-size: 13px !important;
    line-height: 1 !important;
    cursor: help !important;
    transition: color 0.15s ease, border-color 0.15s ease !important;
}
.pricingInfo:hover,
.pricingInfo:focus-visible {
    color: var(--vb-text) !important;
    border-color: var(--vb-text) !important;
    outline: none !important;
}
.pricingInfoMark {
    position: relative !important;
    top: 1px !important;
}
.pricingInfoTip {
    position: absolute !important;
    bottom: calc(100% + 10px) !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(4px) !important;
    width: max-content !important;
    max-width: 300px !important;
    padding: 12px 14px !important;
    background: var(--vb-paper) !important;
    color: var(--vb-paper-text) !important;
    border-radius: var(--vb-radius-input) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.01em !important;
    text-align: left !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
    z-index: 20 !important;
}
.pricingInfoTip::after {
    content: "" !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border: 6px solid transparent !important;
    border-top-color: var(--vb-paper) !important;
}
.pricingInfo:hover .pricingInfoTip,
.pricingInfo:focus .pricingInfoTip,
.pricingInfo:focus-within .pricingInfoTip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* ---- Section dividers (Output, Motion Graph, …) — darker band, light text.
       Doubles as each section table's own header row, so it's always the
       first row: no need to condition border-top/bottom on position. */
.pricingCompareTable tbody tr.pricingCompareSectionRow td {
    padding: 24px 22px 14px 22px !important;
    font-family: var(--vb-font-body) !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
    background-color: var(--vb-surface-2) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)) !important;
    border-top: none !important;
    border-bottom: none !important;
    text-align: left !important;
}
/* The plans page's title in the head's corner cell. .vb-h2 sets its look;
   tripled to beat .vb-h2.vb-h2's margin. */
.pricingCompareTitle.vb-h2.vb-h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 45px !important;
    line-height: 1 !important;
}

/* ---- Icons & cell text ---- */
.pricingCompareTable .pricingCompareCheck,
.pricingCompareTable .pricingCompareX {
    display: inline-block !important;
    vertical-align: middle !important;
    fill: none !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    line-height: 1 !important;
}
.pricingCompareTable .pricingCompareCheck {
    width: 20px !important;
    height: 20px !important;
    stroke: #ffffff !important;
    stroke-width: 1.75 !important;
}
.pricingCompareTable .pricingCompareX {
    width: 18px !important;
    height: 18px !important;
    stroke: var(--vb-text-mute) !important;
    stroke-width: 1.5 !important;
}
.pricingCompareTable .pricingCompareText {
    color: #ffffff !important;
    font-family: var(--vb-font-body) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .pricingCompareTable thead th,
    .pricingCompareTable tbody td {
        padding: 12px 14px !important;
    }
    .pricingCompareTable thead th {
        padding-top: 28px !important;
    }
    .pricingCompareTable tbody td:first-child {
        font-size: 14px !important;
    }
    .pricingCompareTable tbody tr.pricingCompareSectionRow td {
        padding: 20px 14px 10px 14px !important;
        font-size: 22px !important;
    }
    .pricingCompareTable .pricingCompareCheck {
        width: 18px !important;
        height: 18px !important;
    }
    .pricingCompareTable .pricingCompareX {
        width: 16px !important;
        height: 16px !important;
    }
    .pricingCompareTable .pricingCompareText {
        font-size: 14px !important;
    }
    .pricingCompareTierName {
        font-size: 22px !important;
    }
}
@media (max-width: 768px) {
    #pricingCompareWrapper {
        /* Table fits (min-width:0 + break-word), so no horizontal scroll.
           Keep overflow visible so the info tooltip isn't clipped. */
        overflow: visible !important;
    }
    .pricingCompareTable {
        min-width: 0 !important;
    }
    /* Anchor the tooltip to the left edge on narrow screens so a 300px
       bubble can't push past the viewport. */
    .pricingInfoTip {
        left: 0 !important;
        transform: translateX(0) translateY(4px) !important;
        max-width: 78vw !important;
    }
    .pricingInfo:hover .pricingInfoTip,
    .pricingInfo:focus .pricingInfoTip,
    .pricingInfo:focus-within .pricingInfoTip {
        transform: translateX(0) translateY(0) !important;
    }
    .pricingInfoTip::after {
        left: 8px !important;
        transform: translateX(0) !important;
    }
    /* A marker in a tier cell (Pro's Starter) sits right of the middle, so
       its bubble opens leftward from the marker instead. */
    .pricingCompareTable td:not(:first-child) .pricingInfoTip {
        left: auto !important;
        right: 0 !important;
        max-width: 60vw !important;
    }
    .pricingCompareTable td:not(:first-child) .pricingInfoTip::after {
        left: auto !important;
        right: 8px !important;
    }
}
@media (max-width: 768px) {
    /* Feature table: break out flush to viewport edges (no gutter) so the
       columns get every available pixel. */
    #pricingCompareWrapper {
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    /* Compress the comparison table on narrow viewports — stack "From" above
       the price, and "Get" above the tier name, plus tighter cell padding
       and explicit column widths so the first column doesn't hog space. */
    .pricingCompareTable {
        table-layout: fixed !important;
        width: 100% !important;
    }
    .pricingFeatureNote {
        font-size: 11px !important;
    }
    .pricingCompareTierName {
        font-size: 23px !important;
    }
    .pricingCompareTable thead th,
    .pricingCompareTable tbody td {
        padding: 8px 4px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    .pricingCompareTable thead th {
        padding-top: 0 !important;
    }
    .pricingCompareTable tbody td {
        font-size: 14px !important;
    }
    .pricingCompareTable tbody td:first-child {
        font-size: 13px !important;
        padding-left: 6px !important;
        padding-right: 4px !important;
        line-height: 1.25 !important;
    }
    .pricingCompareTable tbody tr.pricingCompareSectionRow td {
        font-size: 23px !important;
        padding: 16px 8px 8px 8px !important;
    }
    .pricingCompareTable .pricingCompareCheck,
    .pricingCompareTable .pricingCompareX {
        width: 16px !important;
        height: 16px !important;
    }
    .pricingCompareTable .pricingCompareText {
        font-size: 13px !important;
    }
}
