/* Webworks Comparison Table. The table, buttons, labels, selects and
   checkbox are UIkit's (from YOOtheme's Table settings and the theme), so
   it takes the site's style. These rules add only what UIkit has no
   classes for: the plan headings, the highlighted plan's column, sticky
   plan names, scrolling that switches off when the table fits, a fixed
   feature column while it scrolls, and printing. Logical properties
   throughout, so right to left languages mirror it.

   Custom properties, for a site's own CSS (set on .ww-comparison-table or
   above it; the script and the Highlight settings only fill in what is
   not already set):
   --ww-comparison-table-accent          the highlighted plan's outline colour
   --ww-comparison-table-highlight       its tint (a colour)
   --ww-comparison-table-outline-width   the outline's thickness (2px)
   --ww-comparison-table-radius          its corners' radius (the theme's cards')
   --ww-comparison-table-card            the Card style's background
   --ww-comparison-table-card-text       its text colour, when the table's own is unreadable on it
   --ww-comparison-table-shadow          the Card style's shadow (a box-shadow
                                         value; up to about 3rem of blur)
   --ww-comparison-table-background      the section's colour, behind sticky cells

   Internal, set by the script and overwritten on every run, not for a site's CSS:
   --ww-comparison-table-flip-*          the theme's own looks for buttons, links, badge
                                         and muted text on a light Card in a dark section */

/* The controls above the table: billing periods, the phone picker, differences */
.ww-comparison-table-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-block-end: 20px;
}
.ww-comparison-table-period-note { margin-inline-start: 0.4em; vertical-align: 0.1em; }
.ww-comparison-table-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ww-comparison-table-pick { display: inline-flex; align-items: center; gap: 8px; }
.ww-comparison-table-pick select { width: auto; max-width: 11em; }
/* UIkit's small size sets a select's end padding to 8px, which only suits a
   full-width select; sized to its text, the arrow would cover the last letters.
   Give back the 20px UIkit's normal select keeps for the arrow. */
.ww-comparison-table-pick .uk-select.uk-form-small:not([multiple]):not([size]) { padding-inline-end: 20px; }
.ww-comparison-table-differences { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; }
.ww-comparison-table-differences input { margin: 0; }

/* Scrolling: comparison-table.js removes ww-comparison-table-overflow while
   the table fits its space (without the script, it always scrolls) */
.ww-comparison-table-overflow .ww-comparison-table-scroll { overflow-x: auto; }
.ww-comparison-table-scroll:focus-visible { outline-offset: 2px; }

/* Equal plan columns; the feature column takes what's left, or its Width
   setting. Narrower than its minimum (set by the number of plans shown),
   the table scrolls; two plans fit a 320 pixel screen. */
.ww-comparison-table table {
    table-layout: fixed;
    min-width: calc(7rem + var(--ww-comparison-table-plans, 3) * 5.5rem);
}
.ww-comparison-table-names .ww-comparison-table-first:not([class*="uk-width-"]) { width: 30%; }

/* Plans' cells: centred by default, or at the start */
.ww-comparison-table [data-ww-plan] { text-align: center; }
.ww-comparison-table-start [data-ww-plan] { text-align: start; }

/* Plan headings: UIkit styles every th as a small column heading; these are the plans' names */
.ww-comparison-table .uk-table th.ww-comparison-table-plan {
    vertical-align: bottom;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: none;
    color: inherit;
}
.ww-comparison-table-plan-head { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ww-comparison-table-start .ww-comparison-table-plan-head { align-items: flex-start; }
.ww-comparison-table-badge { order: -2; margin-block-end: 4px; }
.ww-comparison-table-eyebrow { order: -1; }
.ww-comparison-table-name { margin: 0; }
/* Long names and badges break between syllables rather than spilling into the next column */
.ww-comparison-table-plan-head > * { max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
.ww-comparison-table-badge { white-space: normal; }

/* Prices, descriptions and buttons under the names */
.ww-comparison-table-details td { vertical-align: top; }
.ww-comparison-table-price { margin-block-end: 8px; }
.ww-comparison-table-amount { margin: 0; font-variant-numeric: tabular-nums; }
.ww-comparison-table-price del { margin-inline-start: 0.3em; }
.ww-comparison-table-details .ww-comparison-table-description { margin-block: 8px; }
.ww-comparison-table-button { margin-block-start: 12px; }

/* Plan Details, Line up (the default): a row for each part, so the table
   lines them up across the plans. The rows read as one block under the
   names: the space between parts is what the stacked layout has (8 pixels
   before a description, 12 before a button, in place of the margins), and
   no divider is drawn between them. Always at the top: Middle (the table's
   Vertical Alignment) would float a short description in its row. */
.ww-comparison-table .ww-comparison-table-details:not(.ww-comparison-table-details-stack) > td { vertical-align: top !important; }
.ww-comparison-table-details-price .ww-comparison-table-price,
.ww-comparison-table-details-description .ww-comparison-table-description,
.ww-comparison-table-details-button .ww-comparison-table-button { margin: 0; }
.ww-comparison-table table.uk-table .ww-comparison-table-details-more > td { padding-block-end: 0; }
.ww-comparison-table table.uk-table .ww-comparison-table-details-description.ww-comparison-table-details-next > td { padding-block-start: 8px; }
.ww-comparison-table table.uk-table .ww-comparison-table-details-button.ww-comparison-table-details-next > td { padding-block-start: 12px; }
.ww-comparison-table table.uk-table thead > tr.ww-comparison-table-details-next { border-top: 0; }
.ww-comparison-table-price.ww-comparison-table-fade { animation: ww-comparison-table-fade 0.2s ease-out; }
@keyframes ww-comparison-table-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .ww-comparison-table-price.ww-comparison-table-fade { animation: none; }
}

/* Feature names (th scope="row") look like cells, as UIkit styles every th as a column heading */
.ww-comparison-table .uk-table tbody th[scope="row"] {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: none;
    color: inherit;
}
.ww-comparison-table-feature .ww-comparison-table-description { margin-block-start: 2px; }
.ww-comparison-table-arrow { margin-inline-start: 0.4em; vertical-align: -0.1em; }
[dir="rtl"] .ww-comparison-table-arrow { transform: scaleX(-1); }

/* Group headings across the table: UIkit's column heading look by default */
.ww-comparison-table-group + .ww-comparison-table-group .ww-comparison-table-heading th { padding-block-start: 1.5em; }
.ww-comparison-table-heading-bold .ww-comparison-table-heading th { font-size: inherit; font-weight: bolder; text-transform: none; letter-spacing: inherit; }
.ww-comparison-table-heading-large .ww-comparison-table-heading th { font-size: 1.25rem; font-weight: bolder; text-transform: none; letter-spacing: inherit; }

/* Values: a tick in the text's own colour; a dash a little lighter (screen readers hear "Included" and "Not included") */
.ww-comparison-table-no { opacity: 0.6; }

/* The highlighted plan: a tint over its column and lines down its sides, in
   the theme's primary colour (read by the script into
   --ww-comparison-table-accent), with corners that match the theme's cards
   (read into --ww-comparison-table-radius). Each cell draws its share on a
   ::before behind its content, because a table with collapsed borders
   (UIkit's) may ignore rounded corners on the cells themselves. The top
   line and corners are on the names cell, the bottom on the last row's
   (the script marks it .ww-comparison-table-end). Borders, so nothing
   moves; the cell is the pseudo-element's containing block (names cells
   that stick already are one).
   Style: tint and outline (the default), tint only (-tint), outline only
   (-outline), or a card (-card), set as a class on the table. */
.ww-comparison-table {
    /* The lines' thickness, or none for tint only and card (not for a site to set) */
    --ww-comparison-table-edge: var(--ww-comparison-table-outline-width, 2px);
}
.ww-comparison-table-outline-thin { --ww-comparison-table-outline-width: 1px; }
.ww-comparison-table-outline-thick { --ww-comparison-table-outline-width: 3px; }
/* Fixed corners: the theme's cards are square or rounded as its style says; 4, 8 and 16 pixels are
   a small control's, a card's and a large panel's radius in YOOtheme's styles, whatever the style */
.ww-comparison-table-radius-none { --ww-comparison-table-radius: 0px; }
.ww-comparison-table-radius-small { --ww-comparison-table-radius: 4px; }
.ww-comparison-table-radius-medium { --ww-comparison-table-radius: 8px; }
.ww-comparison-table-radius-large { --ww-comparison-table-radius: 16px; }
.ww-comparison-table-highlight-tint,
.ww-comparison-table-highlight-card { --ww-comparison-table-edge: 0px; }

.ww-comparison-table .ww-comparison-table-highlight {
    position: relative;
    isolation: isolate;
}
.ww-comparison-table .ww-comparison-table-highlight::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--ww-comparison-table-highlight, color-mix(in srgb, currentColor 5%, transparent));
    border: 0 solid var(--ww-comparison-table-accent, currentColor);
    border-inline-width: var(--ww-comparison-table-edge);
}
.ww-comparison-table-highlight-outline .ww-comparison-table-highlight::before { background: none; }
.ww-comparison-table .ww-comparison-table-names > .ww-comparison-table-highlight::before {
    border-block-start-width: var(--ww-comparison-table-edge);
    border-start-start-radius: var(--ww-comparison-table-radius, 0px);
    border-start-end-radius: var(--ww-comparison-table-radius, 0px);
}
.ww-comparison-table table > :last-child > tr:last-child > .ww-comparison-table-highlight::before,
.ww-comparison-table .ww-comparison-table-end > .ww-comparison-table-highlight::before {
    border-block-end-width: var(--ww-comparison-table-edge);
    border-end-start-radius: var(--ww-comparison-table-radius, 0px);
    border-end-end-radius: var(--ww-comparison-table-radius, 0px);
}

/* Card: the theme's card background (read into --ww-comparison-table-card)
   and a soft shadow round the column's outer edge, with no outline and no
   dividers inside it. The shadow is drawn a cell at a time, so it can't
   overlap itself or show a seam where cells meet: each cell's ::after is
   as tall as the column's neighbouring cells too (so its sideways shadow is
   as strong at the cell's ends as in the middle), then clipped back to the
   cell, except where a piece of the column starts and ends (the names, the
   last row, and either side of a group heading, which spans the table), where
   the shadow goes round the corners. */
/* The row's divider, same width and style, in the card's colour: a cell's border outranks its row's, the
   row keeps its height, and the card has no line across it. Above a piece's first cell it is left clear. */
.ww-comparison-table-highlight-card .ww-comparison-table-highlight {
    border-block-start: inherit;
    border-block-start-color: var(--ww-comparison-table-card, Canvas);
}
.ww-comparison-table-highlight-card .ww-comparison-table-piece-start > .ww-comparison-table-highlight { border-block-start-color: transparent; }
/* A light card in a dark section (the script found the table's text unreadable on it): the card's own text colour,
   whatever the section's rules give the headings and prices. What the section's rules restyle for its own background
   (buttons, links, badge, muted text) gets the look the script read from a card outside any section instead, which
   UIkit's colour mode on the cells can't give in a style that only restyles inside sections (see the script).
   Filled danger buttons are the same on both. The selectors are as long as the section's, plus one class. */
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight,
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight :not(:is(.uk-label, .uk-button, .uk-link-muted, .uk-link-text, .uk-text-muted, .uk-text-meta), :is(.uk-label, .uk-button, .uk-link-muted, .uk-link-text, .uk-text-muted, .uk-text-meta) *) { color: var(--ww-comparison-table-card-text); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-button.uk-button-default { color: var(--ww-comparison-table-flip-button-default-fg); background-color: var(--ww-comparison-table-flip-button-default-bg); border-color: var(--ww-comparison-table-flip-button-default-line); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-button.uk-button-primary { color: var(--ww-comparison-table-flip-button-primary-fg); background-color: var(--ww-comparison-table-flip-button-primary-bg); border-color: var(--ww-comparison-table-flip-button-primary-line); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-button.uk-button-secondary { color: var(--ww-comparison-table-flip-button-secondary-fg); background-color: var(--ww-comparison-table-flip-button-secondary-bg); border-color: var(--ww-comparison-table-flip-button-secondary-line); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-button.uk-button-text { color: var(--ww-comparison-table-flip-button-text-fg); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-button.uk-button-link { color: var(--ww-comparison-table-flip-button-link-fg); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-link-muted { color: var(--ww-comparison-table-flip-link-muted-fg); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-link-text { color: var(--ww-comparison-table-flip-link-text-fg); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-label { color: var(--ww-comparison-table-flip-label-fg); background-color: var(--ww-comparison-table-flip-label-bg); }
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-text-muted { color: var(--ww-comparison-table-flip-muted-fg) !important; } /* UIkit's text colour classes are important, in a section too */
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-text-meta { color: var(--ww-comparison-table-flip-meta-fg); }
/* The section's hover and active looks are for its own background too; a hover that shows without changing the colours */
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight .uk-button:is(.uk-button-default, .uk-button-primary, .uk-button-secondary):is(:hover, :focus-visible) { filter: brightness(0.92); }
/* The section's focus ring is white, for its own background; on the card it takes the card's text colour */
.ww-comparison-table.ww-comparison-table-card-flip .ww-comparison-table-highlight :focus-visible { outline-color: var(--ww-comparison-table-card-text); }
.ww-comparison-table-highlight-card .ww-comparison-table-highlight::before { background: var(--ww-comparison-table-card, Canvas); }
.ww-comparison-table-highlight-card .ww-comparison-table-highlight::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block: -4rem;
    z-index: -2;
    pointer-events: none;
    box-shadow: var(--ww-comparison-table-shadow, 0 2px 14px rgb(0 0 0 / 0.14));
    clip-path: inset(4rem -3rem);
}
.ww-comparison-table-highlight-card :is(.ww-comparison-table-names, .ww-comparison-table-piece-start) > .ww-comparison-table-highlight::before,
.ww-comparison-table-highlight-card :is(.ww-comparison-table-names, .ww-comparison-table-piece-start) > .ww-comparison-table-highlight::after {
    border-start-start-radius: var(--ww-comparison-table-radius, 0px);
    border-start-end-radius: var(--ww-comparison-table-radius, 0px);
}
.ww-comparison-table-highlight-card :is(.ww-comparison-table-names, .ww-comparison-table-piece-start) > .ww-comparison-table-highlight::after {
    inset-block-start: 0;
    clip-path: inset(-3rem -3rem 4rem);
}
.ww-comparison-table-highlight-card table > :last-child > tr:last-child > .ww-comparison-table-highlight::before,
.ww-comparison-table-highlight-card :is(.ww-comparison-table-end, .ww-comparison-table-piece-end) > .ww-comparison-table-highlight::before,
.ww-comparison-table-highlight-card table > :last-child > tr:last-child > .ww-comparison-table-highlight::after,
.ww-comparison-table-highlight-card :is(.ww-comparison-table-end, .ww-comparison-table-piece-end) > .ww-comparison-table-highlight::after {
    border-end-start-radius: var(--ww-comparison-table-radius, 0px);
    border-end-end-radius: var(--ww-comparison-table-radius, 0px);
}
.ww-comparison-table-highlight-card table > :last-child > tr:last-child > .ww-comparison-table-highlight::after,
.ww-comparison-table-highlight-card :is(.ww-comparison-table-end, .ww-comparison-table-piece-end) > .ww-comparison-table-highlight::after {
    inset-block-end: 0;
    clip-path: inset(4rem -3rem -3rem);
}
/* A piece that is one row (a heading with a single feature, or details alone): shadow all round */
.ww-comparison-table-highlight-card :is(.ww-comparison-table-names, .ww-comparison-table-piece-start):is(.ww-comparison-table-end, .ww-comparison-table-piece-end) > .ww-comparison-table-highlight::after {
    clip-path: none;
}

/* While it scrolls sideways, the feature names stay in place (First Column).
   Before the sticky names' rules: with Sticky Plan Names on, the corner cell
   above the feature names stays static, as the names row does, rather than
   covering the plan names as they scroll past. */
.ww-comparison-table-fixed-first.ww-comparison-table-overflow .ww-comparison-table-first {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    background-color: var(--ww-comparison-table-background, Canvas);
}

/* Sticky plan names: at the top of the window while the table fits, with
   a solid background (the section's, read by the script) */
.ww-comparison-table-sticky .ww-comparison-table-names > * {
    position: sticky;
    top: var(--ww-comparison-table-sticky-top, 0px);
    z-index: 2;
    background-color: var(--ww-comparison-table-background, Canvas);
}
.ww-comparison-table-sticky.ww-comparison-table-overflow .ww-comparison-table-names > * { position: static; }
/* A highlighted names cell needs a position for its pseudo-elements, and
   sits above its neighbours' solid backgrounds, which would hide a card's shadow.
   Where it is relative rather than sticky, top goes back to auto: the sticky
   offset would otherwise push it down out of its row. */
.ww-comparison-table-sticky .ww-comparison-table-names > .ww-comparison-table-highlight { z-index: 3; }
.ww-comparison-table-sticky.ww-comparison-table-overflow .ww-comparison-table-names > .ww-comparison-table-highlight { position: relative; top: auto; z-index: auto; }

/* Phones and narrow columns, below UIkit's Small breakpoint
   (@breakpoint-small 640px), or Medium (@breakpoint-medium 960px) for a
   table set to Compare Below Medium. Narrow columns: every table below
   Small, and a Medium phone layout table below Medium. The phone layout
   (Responsive set to "Compare two plans"): each feature's name across the
   width, with the plans' values side by side below it, in a grid per row.
   The template adds table roles so screen readers still read a table. With
   the script, two plans show at a time; without it, all of them; the
   template gives the script the same breakpoints.

   CSS has no way to share one set of rules between two media queries, so
   the two blocks below are the same rules with a different first class.
   dev/tests/comparison-table.mjs checks they stay that way: change both. */
/* The width blocks below and further down are for UIkit's default breakpoints. When the site's style changes one, Breakpoints::rewriteAll writes them again at the style's widths and the element gets ww-comparison-table-bp, which the :where(:not(.ww-comparison-table-bp)) in each selector skips (:where keeps their weight). */
@media (max-width: 959.98px) {
    /* Narrow columns: the default name and price styles a little smaller,
       and buttons whose text wraps onto tidy lines, each size its own */
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-name.uk-h4 { font-size: 1rem; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-amount.uk-h3 { font-size: 1.5rem; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) table .uk-button { line-height: 1.3; white-space: normal; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) table .uk-button:not(.uk-button-text) { padding-block: 8px; padding-inline: 12px; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) table .uk-button-small:not(.uk-button-text) { padding-block: 5px; padding-inline: 10px; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) table .uk-button-large:not(.uk-button-text) { padding-block: 12px; padding-inline: 18px; }
    /* The phone layout */
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) table { display: block; min-width: 0; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) table > :is(thead, tbody, tfoot) { display: contents; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) caption { display: block; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) tr { display: grid; grid-template-columns: repeat(var(--ww-comparison-table-plans, 3), minmax(0, 1fr)); }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) tr > :is(.ww-comparison-table-first, [scope="rowgroup"]) { grid-column: 1 / -1; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) :is(.ww-comparison-table-names, .ww-comparison-table-details, .ww-comparison-table-buttons) > .ww-comparison-table-first { display: none; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-feature > th { padding-block-end: 0; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-scroll { overflow: visible; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-scroll .ww-comparison-table-first { position: static; background-color: transparent; }
    /* The names row sticks as a whole (its cells can't leave the row once it's a grid) */
    .ww-comparison-table-phone-m.ww-comparison-table-sticky:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-names {
        position: sticky;
        top: var(--ww-comparison-table-sticky-top, 0px);
        z-index: 2;
        background-color: var(--ww-comparison-table-background, Canvas);
    }
    .ww-comparison-table-phone-m.ww-comparison-table-sticky:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-names > * { position: static; }
    /* A highlighted names cell is no longer sticky, but still the pseudo-elements' containing block */
    .ww-comparison-table-phone-m.ww-comparison-table-sticky:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-names > .ww-comparison-table-highlight { position: relative; top: auto; z-index: auto; }
    /* Feature names cross the highlighted column here, so it keeps its tint (or card background) without the lines, corners and shadow */
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-highlight::before { border-width: 0 !important; border-radius: 0 !important; }
    .ww-comparison-table-phone-m:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-highlight::after { display: none !important; }
}
@media (max-width: 639.98px) {
    /* Narrow columns: the default name and price styles a little smaller,
       and buttons whose text wraps onto tidy lines, each size its own */
    .ww-comparison-table:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-name.uk-h4 { font-size: 1rem; }
    .ww-comparison-table:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-amount.uk-h3 { font-size: 1.5rem; }
    .ww-comparison-table:where(:not(.ww-comparison-table-bp)) table .uk-button { line-height: 1.3; white-space: normal; }
    .ww-comparison-table:where(:not(.ww-comparison-table-bp)) table .uk-button:not(.uk-button-text) { padding-block: 8px; padding-inline: 12px; }
    .ww-comparison-table:where(:not(.ww-comparison-table-bp)) table .uk-button-small:not(.uk-button-text) { padding-block: 5px; padding-inline: 10px; }
    .ww-comparison-table:where(:not(.ww-comparison-table-bp)) table .uk-button-large:not(.uk-button-text) { padding-block: 12px; padding-inline: 18px; }
    /* The phone layout */
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) table { display: block; min-width: 0; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) table > :is(thead, tbody, tfoot) { display: contents; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) caption { display: block; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) tr { display: grid; grid-template-columns: repeat(var(--ww-comparison-table-plans, 3), minmax(0, 1fr)); }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) tr > :is(.ww-comparison-table-first, [scope="rowgroup"]) { grid-column: 1 / -1; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) :is(.ww-comparison-table-names, .ww-comparison-table-details, .ww-comparison-table-buttons) > .ww-comparison-table-first { display: none; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-feature > th { padding-block-end: 0; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-scroll { overflow: visible; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-scroll .ww-comparison-table-first { position: static; background-color: transparent; }
    /* The names row sticks as a whole (its cells can't leave the row once it's a grid) */
    .ww-comparison-table-phone-s.ww-comparison-table-sticky:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-names {
        position: sticky;
        top: var(--ww-comparison-table-sticky-top, 0px);
        z-index: 2;
        background-color: var(--ww-comparison-table-background, Canvas);
    }
    .ww-comparison-table-phone-s.ww-comparison-table-sticky:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-names > * { position: static; }
    /* A highlighted names cell is no longer sticky, but still the pseudo-elements' containing block */
    .ww-comparison-table-phone-s.ww-comparison-table-sticky:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-names > .ww-comparison-table-highlight { position: relative; top: auto; z-index: auto; }
    /* Feature names cross the highlighted column here, so it keeps its tint (or card background) without the lines, corners and shadow */
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-highlight::before { border-width: 0 !important; border-radius: 0 !important; }
    .ww-comparison-table-phone-s:where(:not(.ww-comparison-table-bp)) .ww-comparison-table-highlight::after { display: none !important; }
}

/* A focused link or button in the features never goes under the sticky names (WCAG 2.4.11) */
.ww-comparison-table-sticky :is(tbody, tfoot) :focus { scroll-margin-top: calc(var(--ww-comparison-table-sticky-top, 0px) + var(--ww-comparison-table-head-height, 4em)); }

/* Printing: every plan and feature, no controls, rows kept whole */
@media print {
    .ww-comparison-table-controls { display: none !important; }
    .ww-comparison-table :is(tr, td, th, tbody)[hidden] { display: revert !important; }
    .ww-comparison-table .ww-comparison-table-scroll { overflow: visible; }
    .ww-comparison-table :is(.ww-comparison-table-names > *, .ww-comparison-table-first) { position: static; }
    .ww-comparison-table tr { break-inside: avoid; }
}
