/*
 * Choice box (block vega/choice, shortcode [vega_choice]) and [vega_button]
 * - see core/choicebox.php.
 *
 * Every rule starts with :is(#content, body): the theme styles content
 * headings, lists, links and images with "#content h2/li/a/img" (an id),
 * which plain class selectors cannot beat. :is() takes the specificity of its
 * strongest argument, so these rules win inside the theme's #content and
 * still work on pages without it (landing page, editor iframe).
 *
 * Inner class names carry the prefix "vch-" so no theme rule (.title, .row,
 * .price ...) can reach in. The box adapts to the width of its column, not of
 * the window (container queries): the theme's content column is narrow, the
 * landing page is wide.
 *
 * Layouts: .vega-choice--cards, --compare, --tabs.
 */

/* ===================================================================== *
 * Shared
 * ===================================================================== */

:is(#content, body) .vega-choice {
    --vch-red: #a51715;
    --vch-red-dark: #8a2321;
    --vch-red-tint: #f8ecea;
    --vch-green: #2f7a4f;
    --vch-green-dark: #245f3e;
    --vch-green-tint: #eaf3ed;
    --vch-ink: #3d3632;
    --vch-muted: #6b625c;
    --vch-line: #e6dcdc;
    --vch-paper: #ffffff;

    container-type: inline-size;
    box-sizing: border-box;
    max-width: 960px;
    margin: 2em auto;
    padding: 0;

    color: var(--vch-ink);

    font-family: verdana, arial, helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

:is(#content, body) .vega-choice *,
:is(#content, body) .vega-choice *::before,
:is(#content, body) .vega-choice *::after {
    box-sizing: border-box;
}

/* :where() keeps this reset weaker than the specific rules below. */
:is(#content, body) .vega-choice :where(h2, h3, p, ul, li) {
    margin: 0;
    padding: 0;
    font-style: normal;
    letter-spacing: normal;
    background: none;
    list-style: none;
    list-style-image: none;
}

:is(#content, body) .vega-choice :where(img) {
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
}

:is(#content, body) .vega-choice .vch-icon {
    display: inline-block;
    flex: none;
    width: 16px;
    height: 16px;
}

:is(#content, body) .vega-choice .vch-nw {
    white-space: nowrap;
}

/* Last two words of a heading (ChoiceBox::keepLastWords()). */
:is(#content, body) .vega-choice .vch-keep {
    white-space: nowrap;
}

/* Only in narrow boxes (phones up to about 360px), where a long pair like
 * "Weihnachtsmann entstehen?" (about 320px wide) would run out of the screen. */
@container (max-width: 329px) {
    :is(#content, body) .vega-choice .vch-keep {
        white-space: normal;
    }
}

:is(#content, body) .vega-choice .vch-eyebrow {
    display: block;
    margin-bottom: 6px;

    color: var(--vch-green);

    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.14em;
    text-align: left;
    text-transform: uppercase;
}

:is(#content, body) .vega-choice .vch-title {
    color: var(--vch-red-dark);

    font-family: georgia, 'times new roman', serif;
    font-size: 26px;
    font-style: italic;
    font-weight: normal;
    line-height: 1.25;
    text-align: left;
    text-wrap: pretty;
}

:is(#content, body) .vega-choice .vch-sub {
    margin-top: 6px;

    color: var(--vch-muted);

    font-size: 14px;
    text-align: left;
}

:is(#content, body) .vega-choice .vch-card-title {
    color: var(--vch-ink);

    font-family: georgia, 'times new roman', serif;
    font-size: 21px;
    font-weight: bold;
    line-height: 1.25;
}

:is(#content, body) .vega-choice .vch-price {
    color: var(--vch-ink);

    font-family: georgia, 'times new roman', serif;
    font-size: 28px;
    font-weight: bold;
    line-height: 1.1;
    white-space: nowrap;
}

/* Button inside the box. The arrow sits inline after the last word (.vch-nw),
 * so a wrapped label never leaves it alone in a line. */
:is(#content, body) .vega-choice .vch-btn,
:is(#content, body) .vega-choice .vch-btn:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;

    color: #ffffff;
    background: var(--vch-red);
    border: 0;
    border-radius: 12px;
    box-shadow: none;

    font-family: georgia, 'times new roman', serif;
    font-size: 17px;
    font-weight: bold;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    text-wrap: balance;

    transition: background-color 150ms ease, transform 150ms ease;
}

:is(#content, body) .vega-choice .vch-btn--green,
:is(#content, body) .vega-choice .vch-btn--green:visited {
    background: var(--vch-green);
}

:is(#content, body) .vega-choice .vch-btn:hover,
:is(#content, body) .vega-choice .vch-btn:focus-visible {
    color: #ffffff;
    background: var(--vch-red-dark);
    text-decoration: none;
}

:is(#content, body) .vega-choice .vch-btn--green:hover,
:is(#content, body) .vega-choice .vch-btn--green:focus-visible {
    background: var(--vch-green-dark);
}

:is(#content, body) .vega-choice .vch-btn:active .vch-lbl {
    transform: translateY(1px);
}

:is(#content, body) .vega-choice .vch-btn:focus-visible {
    outline: 3px solid var(--vch-ink);
    outline-offset: 3px;
}

:is(#content, body) .vega-choice .vch-lbl {
    display: block;
    transition: transform 150ms ease;
}

:is(#content, body) .vega-choice .vch-btn .vch-icon {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    vertical-align: -3px;
}

/* Block, not flex: on narrow screens the date wraps as a whole under the
 * label, the icon stays glued to the first word. */
:is(#content, body) .vega-choice .vch-deadline {
    display: block;
    margin-top: 18px;

    color: var(--vch-muted);

    font-size: 13px;
    line-height: 1.6;
    text-align: left;
    text-wrap: balance;
}

/* Block setting "Überschrift zentrieren" (landing page): heading, tabs and
 * deadline line centred. By default they follow the left-aligned page text. */
:is(#content, body) .vega-choice--center :is(.vch-eyebrow, .vch-title, .vch-sub, .vch-deadline) {
    text-align: center;
}

:is(#content, body) .vega-choice .vch-deadline .vch-icon {
    margin-right: 6px;
    vertical-align: -3px;
    color: var(--vch-red);
}

:is(#content, body) .vega-choice .vch-deadline strong {
    color: var(--vch-ink);
}

/* Heading texts emptied in the editor: the space meant for below the heading
 * would otherwise add up with the box's own margin. */
:is(#content, body) .vega-choice > :is(.vch-cards, .vch-table, .vch-switch):first-child {
    margin-top: 0;
}

/* ===================================================================== *
 * Layout "cards"
 * ===================================================================== */

:is(#content, body) .vega-choice--cards .vch-cards {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

@container (min-width: 620px) {
    :is(#content, body) .vega-choice--cards .vch-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }
}

:is(#content, body) .vega-choice--cards .vch-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    background: var(--vch-paper);
    border: 1px solid var(--vch-line);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(61, 54, 50, 0.05), 0 10px 28px rgba(61, 54, 50, 0.08);
}

/* The configurator is the one to promote (upsell): green frame. */
:is(#content, body) .vega-choice--cards .vch-card--b {
    border: 2px solid var(--vch-green);
    box-shadow: 0 1px 2px rgba(47, 122, 79, 0.08), 0 14px 34px rgba(47, 122, 79, 0.16);
}

:is(#content, body) .vega-choice--cards .vch-stage {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;

    background: var(--vch-red-tint);
}

:is(#content, body) .vega-choice--cards .vch-card--b .vch-stage {
    background: var(--vch-green-tint);
}

:is(#content, body) .vega-choice--cards .vch-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Soft fade so the chips stay readable on any photo. */
:is(#content, body) .vega-choice--cards .vch-stage::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 46%;

    background: linear-gradient(rgba(0, 0, 0, 0.28), transparent);
    pointer-events: none;
}

:is(#content, body) :is(.vega-choice--cards, .vega-choice--single) .vch-chip {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;

    color: #ffffff;
    background: var(--vch-green);
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(47, 122, 79, 0.3);

    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.04em;
    line-height: 1.4;
    white-space: nowrap;
}

/* The classic (exclusive letter) gets the quieter white chip. */
:is(#content, body) :is(.vega-choice--cards .vch-card--a, .vega-choice--single .vch-panel--a) .vch-chip {
    color: var(--vch-red-dark);
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

:is(#content, body) :is(.vega-choice--cards, .vega-choice--single) .vch-chip .vch-icon {
    width: 13px;
    height: 13px;
}

:is(#content, body) .vega-choice--cards .vch-facts {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 4px 9px;

    color: var(--vch-muted);
    background: rgba(255, 255, 255, 0.88);
    border-radius: 999px;

    font-size: 11px;
    font-weight: bold;
    line-height: 1.4;
    white-space: nowrap;
}

:is(#content, body) .vega-choice--cards .vch-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

:is(#content, body) .vega-choice--cards .vch-text {
    margin-top: 8px;

    color: var(--vch-muted);

    font-size: 14px;
}

:is(#content, body) .vega-choice--cards .vch-buy {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px 12px;
    margin: auto 0 14px;
    padding-top: 14px;

    border-top: 1px solid var(--vch-line);
}

/* margin-top: auto above keeps the price rows of both cards on one line even
 * when one card has more text; the gap comes from the element before it. */
:is(#content, body) .vega-choice--cards .vch-body > :has(+ .vch-buy) {
    margin-bottom: 18px;
}

:is(#content, body) .vega-choice--cards .vch-price {
    font-size: 30px;
    line-height: 1;
}

/* One line; if the row is too narrow it moves as a whole under the price. */
:is(#content, body) .vega-choice--cards .vch-price-note {
    padding-bottom: 3px;

    color: var(--vch-muted);

    font-size: 12px;
    white-space: nowrap;
}

/* ===================================================================== *
 * Layout "compare"
 * ===================================================================== */

:is(#content, body) .vega-choice--compare .vch-table {
    margin-top: 22px;
    overflow: hidden;

    background: var(--vch-paper);
    border: 1px solid var(--vch-line);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(61, 54, 50, 0.07);
}

:is(#content, body) .vega-choice--compare .vch-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

:is(#content, body) .vega-choice--compare .vch-row + .vch-row {
    border-top: 1px solid var(--vch-line);
}

/* Narrow: the row title spans both columns above its two values. */
:is(#content, body) .vega-choice--compare .vch-label {
    grid-column: 1 / -1;
    padding: 10px 16px 0;

    color: var(--vch-muted);

    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

:is(#content, body) .vega-choice--compare .vch-cell {
    padding: 8px 16px 12px;

    font-size: 14px;
}

/* Empty title cells of the head, photo and button rows would leave blank
 * bands while stacked. */
:is(#content, body) .vega-choice--compare :is(.vch-row--head, .vch-row--media, .vch-row--foot) .vch-label {
    display: none;
}

@container (min-width: 520px) {
    :is(#content, body) .vega-choice--compare .vch-row {
        grid-template-columns: 30% repeat(2, minmax(0, 1fr));
    }

    :is(#content, body) .vega-choice--compare .vch-label {
        grid-column: auto;
        align-self: center;
        padding: 14px 16px;
    }

    :is(#content, body) .vega-choice--compare :is(.vch-row--head, .vch-row--media, .vch-row--foot) .vch-label {
        display: block;
    }

    :is(#content, body) .vega-choice--compare .vch-cell {
        padding: 14px 16px;
    }
}

:is(#content, body) .vega-choice--compare .vch-cell--b {
    background: var(--vch-green-tint);
}

:is(#content, body) .vega-choice--compare .vch-row--head .vch-cell {
    padding-top: 18px;
    padding-bottom: 16px;
}

:is(#content, body) .vega-choice--compare .vch-row--media .vch-cell {
    padding-top: 0;
    padding-bottom: 14px;
}

:is(#content, body) .vega-choice--compare .vch-row--foot .vch-cell {
    padding-top: 16px;
    padding-bottom: 18px;
}

:is(#content, body) .vega-choice--compare .vch-who {
    display: flex;
    align-items: center;
    gap: 10px;
}

:is(#content, body) .vega-choice--compare .vch-dot {
    display: grid;
    flex: none;
    place-items: center;
    width: 38px;
    height: 38px;

    color: #ffffff;
    background: var(--vch-red);
    border-radius: 50%;
}

:is(#content, body) .vega-choice--compare .vch-cell--b .vch-dot {
    background: var(--vch-green);
}

:is(#content, body) .vega-choice--compare .vch-dot .vch-icon {
    width: 19px;
    height: 19px;
}

:is(#content, body) .vega-choice--compare .vch-card-title {
    font-size: 17px;
    line-height: 1.2;
}

:is(#content, body) .vega-choice--compare .vch-tag {
    display: inline-block;
    margin-top: 3px;

    color: var(--vch-red);

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

:is(#content, body) .vega-choice--compare .vch-cell--b .vch-tag {
    color: var(--vch-green);
}

:is(#content, body) .vega-choice--compare .vch-photo {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;

    border-radius: 10px;
}

:is(#content, body) .vega-choice--compare .vch-price {
    font-size: 26px;
}

/* ===================================================================== *
 * Layout "tabs"
 * ===================================================================== */

:is(#content, body) .vega-choice--tabs .vch-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-width: 520px;
    margin: 22px 0 0;
    padding: 6px;

    background: var(--vch-green-tint);
    border-radius: 16px;
}

:is(#content, body) .vega-choice--tabs .vch-tab {
    appearance: none;
    min-height: 52px;
    margin: 0;
    padding: 10px 8px;

    color: var(--vch-muted);
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    cursor: pointer;

    font: inherit;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
    text-transform: none;

    transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

:is(#content, body) .vega-choice--tabs .vch-tab-title {
    display: block;

    color: var(--vch-ink);

    font-family: georgia, 'times new roman', serif;
    font-size: 15px;
    font-weight: bold;
}

:is(#content, body) .vega-choice--tabs .vch-tab-meta {
    display: block;
}

:is(#content, body) .vega-choice--tabs .vch-tab[aria-selected="true"] {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(61, 54, 50, 0.12);
}

:is(#content, body) .vega-choice--tabs .vch-tab--a[aria-selected="true"] .vch-tab-title {
    color: var(--vch-red);
}

:is(#content, body) .vega-choice--tabs .vch-tab--b[aria-selected="true"] .vch-tab-title {
    color: var(--vch-green);
}

:is(#content, body) .vega-choice--tabs .vch-tab:focus-visible {
    outline: 3px solid var(--vch-ink);
    outline-offset: 2px;
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-panel {
    position: relative;
    display: grid;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
    padding: 20px;

    background: var(--vch-paper);
    border: 1px solid var(--vch-line);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(61, 54, 50, 0.07);
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-panel[hidden] {
    display: none;
}

/* Stacked (narrow column): the photo spans the full card width. */
:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-thumb {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;

    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

/* Side by side: square crop next to the text. */
@container (min-width: 640px) {
    :is(#content, body) .vega-choice--tabs .vch-panel {
        grid-template-columns: 220px 1fr;
    }

    :is(#content, body) .vega-choice--tabs .vch-thumb {
        aspect-ratio: 1 / 1;
    }
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-points {
    display: grid;
    gap: 6px;
    margin: 10px 0 16px;

    font-size: 14px;
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-points li {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;

    color: var(--vch-ink);

    font-size: 14px;
    line-height: 1.5;
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-points .vch-icon {
    margin-top: 2px;
    color: var(--vch-red);
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-panel--b .vch-points .vch-icon {
    color: var(--vch-green);
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-card-title + .vch-buyrow {
    margin-top: 14px;
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-buyrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

:is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-buyrow .vch-btn {
    flex: 1 1 220px;
}

/* ===================================================================== *
 * Layout "single": one way as a compact card between paragraphs
 * ===================================================================== */

:is(#content, body) .vega-choice--single {
    max-width: 760px;
}

:is(#content, body) .vega-choice--single .vch-panel {
    margin-top: 0;
}

/* Block setting "Volle Breite": the whole column, whatever the layout. */
:is(#content, body) .vega-choice.vega-choice--full {
    max-width: none;
}

/* The configurator card gets the green "recommendation" frame. */
:is(#content, body) .vega-choice--single .vch-panel--b {
    border: 2px solid var(--vch-green);
    box-shadow: 0 1px 2px rgba(47, 122, 79, 0.08), 0 14px 34px rgba(47, 122, 79, 0.12);
}

:is(#content, body) .vega-choice--center .vch-switch {
    margin-left: auto;
    margin-right: auto;
}

:is(#content, body) .vega-choice--single .vch-media {
    position: relative;
}

/* Photo next to the text already in the theme's narrow content column -
 * stacked, the card would be twice as high there. The photo fills the whole
 * left part edge to edge and as high as the text, like the photos on top of
 * the big cards. */
@container (min-width: 480px) {
    :is(#content, body) .vega-choice--single .vch-panel {
        grid-template-columns: 42% 1fr;
        align-items: stretch;
        gap: 0;
        padding: 0;
        overflow: hidden;
    }

    /* Grid stretch gives it the height of the text; the minimum keeps the
     * photo recognisable if texts were shortened a lot. */
    :is(#content, body) .vega-choice--single .vch-media {
        min-height: 220px;
    }

    :is(#content, body) .vega-choice--single .vch-thumb {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 0;
        box-shadow: none;
    }

    :is(#content, body) .vega-choice--single .vch-panel-body {
        align-self: center;
        padding: 20px 20px 20px 22px;
    }

    :is(#content, body) .vega-choice--single .vch-chip {
        top: 12px;
        left: 12px;
    }
}

:is(#content, body) .vega-choice--single .vch-chip {
    top: 10px;
    left: 10px;
}

/* ===================================================================== *
 * Layout "hint": one way as a single unobtrusive line
 * ===================================================================== */

:is(#content, body) .vega-choice--hint {
    --vch-accent: var(--vch-green);
    --vch-accent-dark: var(--vch-green-dark);
    --vch-accent-tint: var(--vch-green-tint);

    max-width: 760px;
    margin: 1.2em 0;
}

:is(#content, body) .vega-choice--hint-a {
    --vch-accent: var(--vch-red);
    --vch-accent-dark: var(--vch-red-dark);
    --vch-accent-tint: var(--vch-red-tint);
}

:is(#content, body) .vega-choice--hint .vch-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;

    background: var(--vch-accent-tint);
    border-radius: 12px;

    font-size: 14px;
    line-height: 1.5;
}

:is(#content, body) .vega-choice--hint .vch-hint-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;

    color: #ffffff;
    background: var(--vch-accent);
    border-radius: 50%;
}

/* Question on its own line, link below: two clean lines at every width
 * instead of a sentence broken somewhere in the link. */
:is(#content, body) .vega-choice--hint .vch-hint-lead {
    display: block;

    color: var(--vch-ink);
    font-weight: bold;
}

:is(#content, body) .vega-choice--hint a.vch-hint-link,
:is(#content, body) .vega-choice--hint a.vch-hint-link:visited {
    color: var(--vch-accent-dark);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

:is(#content, body) .vega-choice--hint a.vch-hint-link:hover,
:is(#content, body) .vega-choice--hint a.vch-hint-link:focus-visible {
    color: var(--vch-accent-dark);
    text-decoration-thickness: 2px;
}

:is(#content, body) .vega-choice--hint a.vch-hint-link:focus-visible {
    outline: 3px solid var(--vch-ink);
    outline-offset: 2px;
    border-radius: 2px;
}

:is(#content, body) .vega-choice--hint .vch-hint-link .vch-icon {
    width: 15px;
    height: 15px;
    margin-left: 5px;
    vertical-align: -2px;
}

:is(#content, body) .vega-choice--single .vch-deadline {
    margin-top: 12px;
}

/* ===================================================================== *
 * Whole card clickable (cards, single card, tabs panel, hint line)
 *
 * The button (or the hint's text link) stays the only link; its ::after is
 * stretched over the whole card, so a click on the photo or the title opens
 * it too. One link per card keeps screen readers and keyboard users from
 * hearing/tabbing the same target several times. The card is the nearest
 * positioned ancestor of the link - nothing in between may be positioned or
 * transformed. Not used in the comparison table: there it would be unclear
 * which cell leads where.
 * ===================================================================== */

:is(#content, body) :is(.vega-choice--cards .vch-card, .vega-choice--tabs .vch-panel, .vega-choice--single .vch-panel) a.vch-btn::after,
:is(#content, body) .vega-choice--hint a.vch-hint-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;

    border-radius: inherit;
}

:is(#content, body) .vega-choice--hint .vch-hint {
    position: relative;
}

/* Badges sit above the click area but must not swallow the click. */
:is(#content, body) .vega-choice :is(.vch-chip, .vch-facts) {
    pointer-events: none;
}

/* Hovering anywhere on the card highlights its button and lifts the card. */
:is(#content, body) :is(.vega-choice--cards .vch-card, .vega-choice--tabs .vch-panel, .vega-choice--single .vch-panel) {
    transition: box-shadow 200ms ease, transform 200ms ease;
}

@media (hover: hover) {
    :is(#content, body) :is(.vega-choice--cards .vch-card, .vega-choice--tabs .vch-panel, .vega-choice--single .vch-panel):hover {
        box-shadow: 0 2px 4px rgba(61, 54, 50, 0.06), 0 16px 36px rgba(61, 54, 50, 0.14);
        transform: translateY(-2px);
    }

    :is(#content, body) :is(.vega-choice--cards .vch-card, .vega-choice--tabs .vch-panel, .vega-choice--single .vch-panel):hover a.vch-btn {
        background: var(--vch-red-dark);
    }

    :is(#content, body) :is(.vega-choice--cards .vch-card, .vega-choice--tabs .vch-panel, .vega-choice--single .vch-panel):hover a.vch-btn--green {
        background: var(--vch-green-dark);
    }

    :is(#content, body) .vega-choice--hint .vch-hint:hover a.vch-hint-link {
        text-decoration-thickness: 2px;
    }
}

/* ===================================================================== *
 * Narrow phones (box under ~400 px): tighter spacing, nothing breaks out
 * ===================================================================== */

@container (max-width: 400px) {
    :is(#content, body) .vega-choice .vch-title {
        font-size: 22px;
    }

    :is(#content, body) .vega-choice .vch-btn {
        padding: 11px 12px;
        font-size: 15px;
    }

    :is(#content, body) .vega-choice .vch-btn .vch-icon {
        width: 16px;
        height: 16px;
        margin-left: 6px;
    }

    :is(#content, body) .vega-choice--cards .vch-facts {
        display: none;
    }

    :is(#content, body) :is(.vega-choice--cards, .vega-choice--single) .vch-chip {
        top: 10px;
        left: 10px;
    }

    :is(#content, body) .vega-choice--cards .vch-body {
        padding: 16px 14px 14px;
    }

    :is(#content, body) .vega-choice--cards .vch-card-title {
        font-size: 19px;
    }

    :is(#content, body) .vega-choice--cards .vch-price {
        font-size: 26px;
    }

    :is(#content, body) .vega-choice--compare .vch-cell,
    :is(#content, body) .vega-choice--compare .vch-label {
        padding-left: 10px;
        padding-right: 10px;
    }

    :is(#content, body) .vega-choice--compare .vch-who {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    :is(#content, body) .vega-choice--compare .vch-dot {
        width: 30px;
        height: 30px;
    }

    :is(#content, body) .vega-choice--compare .vch-dot .vch-icon {
        width: 15px;
        height: 15px;
    }

    :is(#content, body) .vega-choice--compare .vch-card-title {
        font-size: 15px;
    }

    :is(#content, body) .vega-choice--compare .vch-price {
        font-size: 21px;
    }

    :is(#content, body) .vega-choice--compare .vch-row--foot .vch-btn {
        min-height: 52px;
    }

    :is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-panel {
        padding: 14px;
    }

    :is(#content, body) :is(.vega-choice--tabs, .vega-choice--single) .vch-card-title {
        font-size: 19px;
    }

    :is(#content, body) .vega-choice--tabs .vch-tab-title {
        font-size: 14px;
    }

    /* Price and tag on separate lines instead of a dangling "·". */
    :is(#content, body) .vega-choice--tabs .vch-tab-sep {
        display: none;
    }

    :is(#content, body) .vega-choice--tabs .vch-tab-tag {
        display: block;
    }
}

/* ===================================================================== *
 * Block editor
 * ===================================================================== */

/* Empty fields stay visible (with a hint) so they can be filled again. */
:is(#content, body) .vega-choice.is-editing [data-rich-text-placeholder]::after {
    opacity: 0.55;
}

:is(#content, body) .vega-choice.is-editing .vch-btn {
    cursor: text;
}

:is(#content, body) .vega-choice.is-editing .vch-price {
    cursor: help;
}

/* ===================================================================== *
 * Stand-alone button: [vega_button] (the core Button block styles "Rot" /
 * "Grün" with the same look are part of the theme: css/blocks.css)
 * ===================================================================== */

:is(#content, body) .vega-cta-wrap {
    margin: 1.5em 0;
}

:is(#content, body) .vega-cta-wrap--mitte { text-align: center; }
:is(#content, body) .vega-cta-wrap--links { text-align: left; }
:is(#content, body) .vega-cta-wrap--rechts { text-align: right; }

:is(#content, body) a.vega-cta,
:is(#content, body) a.vega-cta:visited {
    --vch-btn: #a51715;
    --vch-btn-dark: #8a2321;

    display: inline-block;
    padding: 12px 24px;

    color: #ffffff;
    background: var(--vch-btn);
    border: 0;
    border-radius: 12px;
    box-shadow: none;

    font-family: georgia, 'times new roman', serif;
    font-size: 17px;
    font-style: normal;
    font-weight: bold;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;

    transition: background-color 150ms ease, transform 150ms ease;
}

:is(#content, body) a.vega-cta--green,
:is(#content, body) a.vega-cta--green:visited {
    --vch-btn: #2f7a4f;
    --vch-btn-dark: #245f3e;
}

:is(#content, body) a.vega-cta:hover,
:is(#content, body) a.vega-cta:focus-visible {
    color: #ffffff;
    background: var(--vch-btn-dark);
    text-decoration: none;
}

:is(#content, body) a.vega-cta:active {
    transform: translateY(1px);
}

:is(#content, body) a.vega-cta:focus-visible {
    outline: 3px solid var(--vch-btn-dark);
    outline-offset: 3px;
}

@media (max-width: 480px) {
    :is(#content, body) .vega-cta-wrap a.vega-cta {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    :is(#content, body) :is(.vega-choice--cards .vch-card, .vega-choice--tabs .vch-panel, .vega-choice--single .vch-panel):hover {
        transform: none;
    }

    :is(#content, body) .vega-choice *,
    :is(#content, body) a.vega-cta {
        transition: none;
    }
}
