/* ==========================================================================
   TREJKA Project Calculator — Pricing Plans (frontend)
   Matches existing --tpc-* design tokens from frontend.css
   ========================================================================== */

.tpc-pricing-wrap {
    --tpc-primary: #BC0000;
    --tpc-primary-dark: #8B0000;
    --tpc-success: #10b981;
    --tpc-text: #111827;
    --tpc-muted: #6b7280;
    --tpc-border: #e5e7eb;
    --tpc-bg-soft: #f9fafb;

    font-family: inherit;
    color: var(--tpc-text);
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
}

.tpc-pricing-wrap *,
.tpc-pricing-wrap *::before,
.tpc-pricing-wrap *::after { box-sizing: border-box; }

.tpc-pricing-wrap .tpc-empty {
    background: var(--tpc-bg-soft);
    border: 1px dashed var(--tpc-border);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: var(--tpc-muted);
}

/* === Intro === */
.tpc-pricing-intro {
    margin: 0 0 24px;
    text-align: center;
    color: var(--tpc-muted);
    font-size: 16px;
}
.tpc-pricing-intro p { margin: 0 0 8px; }

/* === Controls bar (currency switcher + billing toggle) ===
   When both present: currency left, billing right.
   When only one: it centers automatically via :only-child. */
.tpc-pricing-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 28px;
    flex-wrap: wrap;
}
.tpc-pricing-controls > *:only-child {
    margin: 0 auto;
}

/* Billing toggle (monthly/yearly) — sits inside .tpc-pricing-controls,
   no more absolute centering, no left/transform hacks. */
.tpc-pricing-billing-toggle {
    display: inline-flex;
    background: var(--tpc-bg-soft);
    border: 1px solid var(--tpc-border);
    border-radius: 999px;
    padding: 4px;
    margin: 0;
}
.tpc-pricing-billing-toggle label {
    cursor: pointer;
    margin: 0;
}
.tpc-pricing-billing-toggle label input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.tpc-pricing-billing-toggle label > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tpc-muted);
    border-radius: 999px;
    transition: all 0.15s;
}
.tpc-pricing-billing-toggle label input:checked + span {
    background: #fff;
    color: var(--tpc-text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.tpc-pricing-discount-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    font-style: normal;
    color: var(--tpc-success);
    background: #ecfdf5;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

/* === Currency switcher (scoped to pricing) === */
.tpc-pricing-currency-switcher {
    display: inline-flex;
    gap: 6px;
    margin: 0;
    flex-wrap: wrap;
}
.tpc-pricing-currency-switcher .tpc-currency-pill {
    /* Inherits base look from frontend.css; reinforce minimum here in case shortcode
       is rendered on a page where the calculator's frontend.css hasn't loaded yet. */
    background: #fff;
    border: 1px solid var(--tpc-border);
    color: var(--tpc-muted);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    letter-spacing: 0.3px;
}
.tpc-pricing-currency-switcher .tpc-currency-pill:hover {
    border-color: var(--tpc-primary);
    color: var(--tpc-primary);
}
.tpc-pricing-currency-switcher .tpc-currency-pill.is-active {
    background: var(--tpc-primary);
    border-color: var(--tpc-primary);
    color: #fff;
}

/* === Billing mode visibility === */
.tpc-pricing-wrap[data-billing-mode="monthly"] .tpc-pricing-card-price-yearly,
.tpc-pricing-wrap[data-billing-mode="monthly"] .tpc-pricing-compare-price.tpc-pricing-card-price-yearly { display: none; }
.tpc-pricing-wrap[data-billing-mode="yearly"]  .tpc-pricing-card-price-monthly,
.tpc-pricing-wrap[data-billing-mode="yearly"]  .tpc-pricing-compare-price.tpc-pricing-card-price-monthly { display: none; }

/* === Cards grid === */
.tpc-pricing-cards {
    display: grid;
    gap: 18px;
    margin-bottom: 30px;
}
.tpc-pricing-cards-cols-1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.tpc-pricing-cards-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tpc-pricing-cards-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tpc-pricing-cards-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
    .tpc-pricing-cards-cols-3,
    .tpc-pricing-cards-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .tpc-pricing-cards-cols-2,
    .tpc-pricing-cards-cols-3,
    .tpc-pricing-cards-cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* === Single card === */
.tpc-pricing-card {
    background: #fff;
    border: 1px solid var(--tpc-border);
    border-radius: 12px;
    padding: 28px 22px 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}
.tpc-pricing-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
.tpc-pricing-card-featured {
    border: 2px solid var(--tpc-primary);
    padding: 27px 21px 21px; /* compensate for thicker border so heights stay aligned */
    box-shadow: 0 8px 24px rgba(188, 0, 0, 0.08);
}

.tpc-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tpc-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 13px;
    border-radius: 999px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tpc-pricing-card-header {
    margin-bottom: 18px;
}
.tpc-pricing-card-name {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--tpc-muted);
    margin: 0 0 6px;
    padding: 0;
}
.tpc-pricing-card-desc {
    font-size: 13px;
    color: var(--tpc-muted);
    margin: 0;
    padding: 0;
    min-height: 18px;
}

.tpc-pricing-card-price {
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--tpc-muted);
    line-height: 1.2;
}
.tpc-pricing-price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--tpc-text);
    line-height: 1;
}
.tpc-pricing-price-suffix {
    font-size: 14px;
    color: var(--tpc-muted);
    font-weight: 400;
}
.tpc-pricing-custom-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--tpc-text);
    line-height: 1;
}

/* === Card features list === */
.tpc-pricing-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    border-top: 1px solid var(--tpc-border);
    padding-top: 18px;
}
.tpc-pricing-card-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    font-size: 14px;
    color: var(--tpc-text);
    line-height: 1.45;
}
.tpc-pricing-card-feature.is-no {
    color: var(--tpc-muted);
}
.tpc-pricing-card-feature-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    margin-top: 2px;
}
.tpc-pricing-card-feature.is-yes .tpc-pricing-card-feature-icon {
    background: #ecfdf5;
    color: var(--tpc-success);
}
.tpc-pricing-card-feature.is-no .tpc-pricing-card-feature-icon {
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 12px;
}
.tpc-pricing-card-feature-label {
    flex: 1;
    min-width: 0;
}
.tpc-pricing-card-feature-sub {
    display: block;
    font-size: 12px;
    color: var(--tpc-muted);
    font-weight: 400;
    margin-top: 1px;
}

/* === CTA button === */
.tpc-pricing-card-cta-wrap {
    margin-top: auto;
    padding-top: 4px;
}
.tpc-pricing-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--tpc-border);
    background: #fff;
    color: var(--tpc-text);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.2;
    font-family: inherit;
}
.tpc-pricing-cta:hover {
    border-color: var(--tpc-primary);
    color: var(--tpc-primary);
    text-decoration: none;
}
.tpc-pricing-cta-primary,
.tpc-pricing-cta-primary:hover {
    background: var(--tpc-primary);
    border-color: var(--tpc-primary);
    color: #fff;
}
.tpc-pricing-cta-primary:hover {
    background: var(--tpc-primary-dark);
    border-color: var(--tpc-primary-dark);
}

/* === Divider between cards & compare table (in "both" view) === */
.tpc-pricing-divider {
    text-align: center;
    margin: 16px 0 24px;
    position: relative;
}
.tpc-pricing-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--tpc-border);
}
.tpc-pricing-divider span {
    background: #fff;
    padding: 0 16px;
    position: relative;
    color: var(--tpc-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
}

/* === Compare table === */
.tpc-pricing-compare-wrap {
    margin-bottom: 24px;
    /* v1.12.0 — the scroll box moved to .tpc-pricing-compare-scroll (see the
       template). These two are kept as a fallback for markup rendered by a page
       cache built before the upgrade, where the inner div is not there yet; the
       :has() rule below turns them off as soon as it is. */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* v1.9.6 — Design tokens repeated here so the template is self-sufficient.
       Previously these were only declared on `.tpc-pricing-wrap` (root of the
       standalone [tpc_pricing] shortcode). When TPC_Pricing_Shortcodes::render_comparison_inline
       is called from OUTSIDE that wrapper — e.g. from the calculator's
       pricing_selector accordion — `--tpc-primary` is undefined and the
       featured column loses its red background, leaving `color: #fff` text
       on a white background = "Standard" invisible. Declaring the same tokens
       here guarantees identical rendering regardless of parent. */
    --tpc-primary: #BC0000;
    --tpc-primary-dark: #8B0000;
    --tpc-success: #10b981;
    --tpc-text: #111827;
    --tpc-muted: #6b7280;
    --tpc-border: #e5e7eb;
    --tpc-bg-soft: #f9fafb;
}
.tpc-pricing-compare-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
/* With the inner scroll box present the wrapper must not scroll as well, or a
   sticky header still has a scrollport between itself and the page. */
.tpc-pricing-compare-wrap:has(> .tpc-pricing-compare-scroll) { overflow: visible; }

.tpc-pricing-compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    /* v1.8.6 — hairline effect: outer border ~8%, inner rows ~5% opacity of ink.
       Feels structural without dominating the page. */
    border: 1px solid rgba(17,24,39,0.08);
    /* v1.9.4 — `!important` na border-radius + overflow bo motywy jak Blocksy
       nadpisują `border-radius: 0` w swoim table stylesheet. Bez tego rogi tabeli
       pozostają kwadratowe mimo tego że my ustawiamy 12px. */
    border-radius: 12px !important;
    overflow: hidden !important;
    min-width: 600px;
}
/* v1.9.4 — Hover state na wierszach z wartościami funkcji.
   `tr:not([class])` celuje tylko w feature rows — group/price/cta rows mają
   swoje klasy więc są automatycznie wykluczone (nie hover'ują się).
   Featured column dostaje ciemniejszy odcień różu żeby akcent Standard planu
   pozostał widoczny nawet podczas hover. */
.tpc-pricing-compare-table tbody tr td,
.tpc-pricing-compare-table tbody tr th {
    transition: background 0.15s ease;
}
.tpc-pricing-compare-table tbody tr:not([class]):hover td,
.tpc-pricing-compare-table tbody tr:not([class]):hover th {
    background: #fafbfc;
}
.tpc-pricing-compare-table tbody tr:not([class]):hover td.is-featured {
    background: #fdeeee;
}
.tpc-pricing-compare-table th,
.tpc-pricing-compare-table td {
    padding: 14px 18px;
    text-align: center;
    font-size: 14px;
    /* v1.8.9 — themes like Blocksy set `border-width/style/color` longhand on
       every table cell, which paints ALL four sides. Our `border-bottom` only
       overrode the bottom, so top/left/right stayed with the theme border and
       showed as a heavy grid. Zero all sides first, then paint only the bottom
       hairline. */
    border: 0;
    border-bottom: 1px solid rgba(17,24,39,0.05);
    vertical-align: middle;
}
.tpc-pricing-compare-table tbody tr:last-child th,
.tpc-pricing-compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.tpc-pricing-compare-table thead tr:first-child th {
    padding-top: 22px;
    padding-bottom: 14px;
    background: var(--tpc-bg-soft);
    font-weight: 700;
    font-size: 16px;
    color: var(--tpc-text);
}
.tpc-pricing-compare-table thead tr:first-child th.is-featured {
    background: var(--tpc-primary);
    color: #fff;
}
.tpc-pricing-compare-plan-name {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}
.tpc-pricing-compare-plan-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 9px;
    background: rgba(255,255,255,0.2);
    border-radius: 999px;
    color: #fff;
}

.tpc-pricing-compare-feature-col {
    text-align: left !important;
    color: var(--tpc-muted);
    font-weight: 500;
    background: var(--tpc-bg-soft);
    width: 30%;
    font-size: 14px;
}
.tpc-pricing-compare-feature-col-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--tpc-muted);
}

/* Price row in compare table */
.tpc-pricing-compare-price-row .tpc-pricing-compare-feature-col {
    color: var(--tpc-text);
    font-weight: 600;
}
.tpc-pricing-compare-price-cell {
    background: var(--tpc-bg-soft);
}
.tpc-pricing-compare-price-cell.is-featured {
    background: #fef2f2;
}
.tpc-pricing-compare-price {
    line-height: 1.1;
}
.tpc-pricing-compare-price .tpc-pricing-price-amount {
    font-size: 24px;
}

/* Featured column accent */
.tpc-pricing-compare-cell.is-featured {
    background: #fef9f9;
}

/* Feature value icons in compare table */
.tpc-pricing-val-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ecfdf5;
    color: var(--tpc-success);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
.tpc-pricing-val-dash {
    color: #d1d5db;
    font-size: 16px;
    line-height: 1;
}
.tpc-pricing-val-text {
    font-weight: 600;
    color: var(--tpc-text);
}

/* CTA row in compare table */
.tpc-pricing-compare-cta-row td,
.tpc-pricing-compare-cta-row th {
    padding-top: 18px;
    padding-bottom: 18px;
    background: var(--tpc-bg-soft);
}
.tpc-pricing-compare-cta-cell.is-featured {
    background: #fef2f2;
}
.tpc-pricing-compare-cta-cell .tpc-pricing-cta {
    width: auto;
    padding: 10px 22px;
    font-size: 13px;
}

/* Mobile compare table */
@media (max-width: 640px) {
    .tpc-pricing-compare-table th,
    .tpc-pricing-compare-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    .tpc-pricing-compare-plan-name { font-size: 14px; }
    .tpc-pricing-compare-price .tpc-pricing-price-amount { font-size: 18px; }
    .tpc-pricing-compare-cta-cell .tpc-pricing-cta { padding: 8px 14px; font-size: 12px; }
}

/* === FAQ accordion =========================================================
   Aggressive defense against theme overrides:
   - Many themes (and page builders like Bricks/Elementor/Divi) set
     `details summary { display: list-item !important }` or similar, which
     breaks our flex layout AND keeps the default ▶/▼ disclosure marker.
   - Our rules below use !important on the layout-critical properties
     (display, list-style, marker hiding, text-align, font-size on h3) so
     they win the specificity war regardless of how the host theme styles
     <summary>/<details>/<h3>.
   - The toggle is an inline SVG with two paths — hiding the vertical one
     produces a minus sign when [open] (per user request).
   ========================================================================== */
.tpc-pricing-faq {
    margin: 40px auto 0;
    max-width: 820px;
    width: 100%;
}
.tpc-pricing-faq-only .tpc-pricing-faq {
    margin-top: 0;
}
.tpc-pricing-faq-header {
    text-align: center;
    /* v1.8.8 — auto margins let .tpc-shead (max-width: 720px) center itself in
       its parent (.tpc-pricing-faq, max-width: 820px). Previous `0 0` value
       with !important pinned the header to the left, offsetting by ~100px. */
    margin: 0 auto 28px;
    padding: 0;
}
.tpc-pricing-faq-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--tpc-text);
    margin: 0;
    padding: 0;
    line-height: 1.2;
    text-align: center;
}
.tpc-pricing-faq-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Single FAQ card */
.tpc-pricing-faq-item {
    background: #fff !important;
    border: 1px solid var(--tpc-border) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: border-color 0.18s, box-shadow 0.18s !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.tpc-pricing-faq-item:hover {
    border-color: rgba(188, 0, 0, 0.4) !important;
}
.tpc-pricing-faq-item[open] {
    border-color: var(--tpc-primary) !important;
    box-shadow: 0 4px 14px rgba(188, 0, 0, 0.05) !important;
}

/* Summary (question row) — kill ALL default markers aggressively */
.tpc-pricing-faq-question {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 18px !important;
    padding: 18px 22px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--tpc-text) !important;
    line-height: 1.45 !important;
    user-select: none;
    list-style: none !important;
    list-style-type: none !important;
    outline: none;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
}
/* WebKit + Blink (Chrome, Safari, Edge) default disclosure marker */
.tpc-pricing-faq-question::-webkit-details-marker {
    display: none !important;
    content: '' !important;
}
/* Firefox + spec marker */
.tpc-pricing-faq-question::marker {
    display: none !important;
    content: '' !important;
    font-size: 0 !important;
}
/* Some themes add ::before triangles on summary — kill those too */
.tpc-pricing-faq-question::before {
    display: none !important;
    content: none !important;
}
.tpc-pricing-faq-question:focus-visible {
    outline: 2px solid var(--tpc-primary);
    outline-offset: -2px;
}

.tpc-pricing-faq-question-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Toggle icon — minimalist text-style + that becomes − when [open]
   No circle background, just the icon in muted color. */
.tpc-pricing-faq-icon {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 24px !important;
    height: 24px !important;
    color: var(--tpc-muted);
    transition: color 0.18s;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
}
.tpc-pricing-faq-icon-svg {
    display: block !important;
    width: 22px;
    height: 22px;
}
/* Vertical bar shrinks to nothing on open → plus becomes minus */
.tpc-pricing-faq-icon-v {
    transform-origin: 12px 12px;
    transition: transform 0.22s ease, opacity 0.18s ease;
}
.tpc-pricing-faq-item[open] .tpc-pricing-faq-icon-v {
    transform: scaleY(0);
    opacity: 0;
}
.tpc-pricing-faq-item[open] .tpc-pricing-faq-icon {
    color: var(--tpc-primary);
}
.tpc-pricing-faq-question:hover .tpc-pricing-faq-icon {
    color: var(--tpc-primary);
}

/* Answer body */
.tpc-pricing-faq-answer {
    padding: 0 22px 22px !important;
    margin: 0 !important;
}
.tpc-pricing-faq-answer-inner {
    padding-top: 16px !important;
    border-top: 1px solid var(--tpc-border) !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    color: var(--tpc-text) !important;
}
.tpc-pricing-faq-answer-inner p {
    margin: 0 0 10px !important;
    padding: 0 !important;
}
.tpc-pricing-faq-answer-inner p:last-child { margin-bottom: 0 !important; }
.tpc-pricing-faq-answer-inner ul,
.tpc-pricing-faq-answer-inner ol {
    margin: 8px 0 !important;
    padding-left: 22px !important;
}
.tpc-pricing-faq-answer-inner a {
    color: var(--tpc-primary) !important;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .tpc-pricing-faq-title { font-size: 22px; }
    .tpc-pricing-faq-question { padding: 14px 16px !important; font-size: 14px !important; gap: 12px !important; }
    .tpc-pricing-faq-answer { padding: 0 16px 16px !important; }
    .tpc-pricing-faq-answer-inner { font-size: 14px !important; }
}

/* === Inquiry form (v1.4.0) — embedded below FAQ ===
   Layout mirrors the FAQ block: centered title + description live OUTSIDE
   the white card, and the form sits inside its own bordered card.
   ============================================================= */
.tpc-pricing-inquiry {
    margin: 40px auto 0;
    max-width: 720px;
    width: 100%;
}
.tpc-pricing-inquiry--wide {
    max-width: 1080px;
}
.tpc-pricing-inquiry-header {
    text-align: center;
    margin: 0 auto 24px;
    padding: 0 16px;
}
.tpc-pricing-inquiry-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--tpc-text);
    margin: 0 0 12px;
    padding: 0;
    line-height: 1.2;
    text-align: center;
}
.tpc-pricing-inquiry-description {
    color: var(--tpc-muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
    max-width: 580px;
    margin: 0 auto;
}
.tpc-pricing-inquiry-description p { margin: 0 0 6px; }
.tpc-pricing-inquiry-description p:last-child { margin: 0; }
.tpc-pricing-inquiry-form-wrap {
    background: #fff;
    border: 1px solid var(--tpc-border);
    border-radius: 14px;
    padding: 28px 28px 24px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.03);
    box-sizing: border-box;
}

.tpc-pricing-inquiry-chosen-plan {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    color: var(--tpc-primary);
    padding: 8px 14px 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 18px;
}
.tpc-pricing-inquiry-chosen-label {
    color: var(--tpc-muted);
    font-weight: 500;
}
.tpc-pricing-inquiry-chosen-clear {
    background: rgba(188, 0, 0, 0.15);
    color: var(--tpc-primary);
    border: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tpc-pricing-inquiry-chosen-clear:hover {
    background: var(--tpc-primary);
    color: #fff;
}

.tpc-pricing-inquiry-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 14px !important;
    margin-bottom: 14px !important;
    align-items: stretch !important;
}
.tpc-pricing-inquiry-row > .tpc-pricing-inquiry-field {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
}
.tpc-pricing-inquiry-field {
    margin-bottom: 14px;
    box-sizing: border-box;
}
.tpc-pricing-inquiry-field-wide {
    width: 100%;
}
.tpc-pricing-inquiry-field > label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--tpc-text) !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}
.tpc-required { color: var(--tpc-primary); }
.tpc-pricing-inquiry-field > input,
.tpc-pricing-inquiry-field > select,
.tpc-pricing-inquiry-field > textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: var(--tpc-text) !important;
    background: #fff !important;
    border: 1px solid var(--tpc-border) !important;
    border-radius: 8px !important;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.4 !important;
}
.tpc-pricing-inquiry-field > input:focus,
.tpc-pricing-inquiry-field > select:focus,
.tpc-pricing-inquiry-field > textarea:focus {
    outline: none !important;
    border-color: var(--tpc-primary) !important;
    box-shadow: 0 0 0 3px rgba(188, 0, 0, 0.08) !important;
}
.tpc-pricing-inquiry-field > textarea {
    resize: vertical !important;
    min-height: 90px !important;
}

/* GDPR row uses inline styles in HTML for max specificity — this is just
   a safety net in case those get stripped by a sanitizer. */
.tpc-pricing-inquiry-gdpr-wrap {
    display: block;
    margin: 14px 0 18px;
    clear: both;
    text-align: left;
}

.tpc-pricing-inquiry-submit-row {
    margin-top: 6px;
}
.tpc-pricing-inquiry-submit {
    width: 100%;
}
.tpc-pricing-inquiry-result {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}
.tpc-pricing-inquiry-result.is-success {
    background: #ecfdf5;
    color: #047857;
    padding: 16px;
    border-radius: 8px;
    font-weight: 500;
}
.tpc-pricing-inquiry-result.is-error {
    background: #fef2f2;
    color: var(--tpc-primary);
    padding: 12px;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .tpc-pricing-inquiry-form-wrap { padding: 22px 18px 18px; }
    .tpc-pricing-inquiry-title { font-size: 22px; }
    .tpc-pricing-inquiry-row { flex-direction: column !important; gap: 0 !important; }
    .tpc-pricing-inquiry-row > .tpc-pricing-inquiry-field { margin-bottom: 14px !important; }
}

/* ==========================================================================
   v1.7.4 — Ujednolicone nagłówki sekcji (eyebrow + duży tytuł)
   Wzorowane na stylu .tb-head z wtyczki TREJKA Blocks. Font-stack z fallbackiem
   do system-ui — jeśli Blocks ładuje Figtree, nagłówek go użyje; jeśli nie,
   degraduje do czystego system fontu. Self-contained, nie wymaga Blocks.
   ========================================================================== */
.tpc-shead {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px;
}
.tpc-shead__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--tpc-primary);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 16px;
    padding: 6px 16px;
    background: #fff0f0;
    border: 1px solid #fce4e4;
    border-radius: 100px;
    box-shadow: 0 2px 8px rgba(188,0,0,0.06);
    line-height: 1.4;
}
.tpc-shead__eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tpc-primary);
    flex: 0 0 auto;
}
.tpc-shead__title {
    font-family: 'Figtree', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--tpc-text);
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin: 0 0 14px;
    padding: 0;
}

/* ==========================================================================
   v1.7.4 — Odświeżony formularz zapytania (premium look)
   ========================================================================== */
.tpc-pricing-inquiry-form-wrap {
    border-radius: 18px !important;
    padding: 34px 34px 28px !important;
    box-shadow: 0 10px 40px rgba(17,24,39,0.06), 0 2px 8px rgba(17,24,39,0.04) !important;
    border-color: #eef0f3 !important;
    position: relative;
    overflow: hidden;
}
/* Subtelny czerwony akcent na górnej krawędzi karty */
.tpc-pricing-inquiry-form-wrap::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tpc-primary), #ff5757 55%, var(--tpc-primary));
}
.tpc-pricing-inquiry-row {
    gap: 16px !important;
    margin-bottom: 16px !important;
}
.tpc-pricing-inquiry-field > label {
    font-size: 12.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    color: #374151 !important;
    margin: 0 0 7px !important;
    text-transform: none !important;
}
.tpc-pricing-inquiry-field > input,
.tpc-pricing-inquiry-field > select,
.tpc-pricing-inquiry-field > textarea {
    padding: 12px 15px !important;
    font-size: 14.5px !important;
    border: 1.5px solid #e7eaee !important;
    border-radius: 11px !important;
    background: #fafbfc !important;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s !important;
}
.tpc-pricing-inquiry-field > select {
    height: 46px;
    cursor: pointer;
}
.tpc-pricing-inquiry-field > input::placeholder,
.tpc-pricing-inquiry-field > textarea::placeholder {
    color: #aab1bb !important;
}
.tpc-pricing-inquiry-field > input:hover,
.tpc-pricing-inquiry-field > textarea:hover {
    border-color: #d6dbe2 !important;
}
.tpc-pricing-inquiry-field > input:focus,
.tpc-pricing-inquiry-field > select:focus,
.tpc-pricing-inquiry-field > textarea:focus {
    border-color: var(--tpc-primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(188, 0, 0, 0.09) !important;
}
.tpc-pricing-inquiry-field > textarea {
    min-height: 110px !important;
}

/* Submit — pewny, z lekkim liftem i strzałką */
.tpc-pricing-inquiry-submit-row {
    margin-top: 10px !important;
}
.tpc-pricing-inquiry-submit {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 28px !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(188,0,0,0.22) !important;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s !important;
}
.tpc-pricing-inquiry-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(188,0,0,0.30) !important;
}
.tpc-pricing-inquiry-submit:active {
    transform: translateY(0);
}
.tpc-pricing-inquiry-submit-arrow {
    font-size: 17px;
    line-height: 1;
    transition: transform 0.15s;
}
.tpc-pricing-inquiry-submit:hover .tpc-pricing-inquiry-submit-arrow {
    transform: translateX(4px);
}

@media (max-width: 600px) {
    .tpc-shead__title { font-size: 26px; }
    .tpc-pricing-inquiry-form-wrap { padding: 24px 18px 20px !important; border-radius: 14px !important; }
}

/* ==========================================================================
   v1.8.7 — Wiersze grupujące w tabeli porównawczej
   Grupa to nagłówek sekcji spinający wszystkie kolumny — wizualnie oddziela
   grupy funkcji (Podstawa opieki / Backup / Monitoring itd.). Nie zawiera
   wartości per plan — to czysty separator.
   ========================================================================== */
.tpc-pricing-compare-group-row .tpc-pricing-compare-group-header {
    text-align: left;
    padding: 16px 18px 10px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--tpc-primary);
    background: linear-gradient(to right, #fff5f5 0%, #ffffff 100%);
    border-top: 1.5px solid rgba(188, 0, 0, 0.15);
    border-bottom: 1px solid rgba(17, 24, 39, 0.05);
}
/* First group has no top-border (it's the very first row after price header) */
.tpc-pricing-compare-table tbody tr.tpc-pricing-compare-group-row:first-child .tpc-pricing-compare-group-header {
    border-top: 0;
}

/* v1.9.8 — Feature label as link (opens explanation page in new tab).
   Whole label is the click target (bigger than just the asterisk).
   Underline appears on hover as the standard "this is a link" affordance. */
.tpc-pricing-compare-feature-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(17,24,39,0.25);
    transition: color 0.15s, border-color 0.15s;
}
.tpc-pricing-compare-feature-link:hover,
.tpc-pricing-compare-feature-link:focus {
    color: var(--tpc-primary);
    border-bottom-color: var(--tpc-primary);
}
.tpc-pricing-compare-feature-asterisk {
    color: var(--tpc-primary);
    font-weight: 700;
    margin-left: 3px;
    font-size: 0.9em;
    vertical-align: super;
    line-height: 0;
}

/* ==========================================================================
   v1.12.0 — SKIN „TREJKA"
   --------------------------------------------------------------------------
   Opt-in per pricing table (Ustawienia → Wygląd → Skin). Nothing here applies
   unless the wrapper carries data-tpc-skin="trejka", so every table saved
   before this version renders exactly as it did in 1.11.0.

   Palette lifted from the TREJKA mock-up (makieta.trejka.dev):
   the brand red is the same #BC0000 the plugin already used — what changes is
   the grey ramp (warm, not the cool Tailwind greys), the corner radius
   (2px, sharp) and the dark group bars.

   The skin can attach to two different roots:
     .tpc-pricing-wrap[data-tpc-skin]          — full [tpc_pricing] shortcode
     .tpc-pricing-compare-wrap[data-tpc-skin]  — bare comparison table rendered
                                                 by render_comparison_inline()
   Both are matched by the :is() prefix below.
   ========================================================================== */

.tpc-pricing-wrap[data-tpc-skin="trejka"],
.tpc-pricing-compare-wrap[data-tpc-skin="trejka"] {
    --tpc-primary: #BC0000;
    --tpc-primary-dark: #8B0000;
    --tpc-success: #2E9E5B;
    --tpc-text: #55504E;
    --tpc-heading: #35302F;
    --tpc-ink: #1A1A18;
    --tpc-muted: #8F8785;
    --tpc-muted-soft: #9A9290;
    --tpc-border: #DDD4D4;
    --tpc-bg-soft: #FFFAFA;
    --tpc-hairline: #F5EDED;
    --tpc-outline: #F0E6E6;
    --tpc-on-dark: #FFB3B3;
    --tpc-radius-card: 16px;
    --tpc-radius-sharp: 2px;
    /* Themes with a fixed site header can push the sticky row down:
       .tpc-pricing-compare-wrap { --tpc-sticky-offset: 72px; } */
    --tpc-sticky-offset: 0px;

    color: var(--tpc-text);
}

/* --- table shell --- */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table {
    border: 1px solid var(--tpc-outline);
    border-radius: var(--tpc-radius-card) !important;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table th,
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table td {
    border-bottom: 1px solid var(--tpc-hairline);
    padding: 18px 22px;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table tbody tr:not([class]):hover td,
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table tbody tr:not([class]):hover th {
    background: #FFFCFC;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table tbody tr:not([class]):hover td.is-featured {
    background: #FFF3F3;
}

/* --- header row: white ground, the featured column is tinted, not inverted --- */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table thead tr:first-child th {
    background: #fff;
    color: var(--tpc-heading);
    padding-top: 34px;
    padding-bottom: 6px;
    border-bottom: 0;
    vertical-align: bottom;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-table thead tr:first-child th.is-featured {
    background: var(--tpc-bg-soft);
    color: var(--tpc-heading);
    box-shadow: inset 0 3px 0 0 var(--tpc-primary);
}
/* The badge is absolutely positioned, so the header cell has to be a positioning
   context. Deliberately a LOW-specificity selector: the sticky-header rule below
   replaces this with `position: sticky`, and it can only do that if it wins. An
   earlier draft put `position: relative` on `th.is-featured` inside the :is()
   prefix — (0,5,3) — which quietly beat the sticky rule and left the featured
   column, and only that column, scrolling away with the page. Sticky is itself a
   positioned value, so the badge stays anchored either way. */
[data-tpc-skin="trejka"] .tpc-pricing-compare-table thead tr:first-child th {
    position: relative;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-plan-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-plan-col.is-featured .tpc-pricing-compare-plan-name {
    color: var(--tpc-primary);
}
/* Badge sits above the plan name as a red tab, the way the mock-up has it. */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-plan-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
    background: var(--tpc-primary);
    color: #fff;
    border-radius: var(--tpc-radius-sharp);
    padding: 4px 10px;
    font-size: 9px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- price row --- */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-price-cell {
    background: #fff;
    padding-top: 2px;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-price-cell.is-featured {
    background: var(--tpc-bg-soft);
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-price .tpc-pricing-price-amount {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: var(--tpc-ink);
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-price-cell.is-featured .tpc-pricing-price-amount {
    color: var(--tpc-primary);
}

/* Visually hidden, still announced. Same recipe as core's .screen-reader-text,
   duplicated here so the stylesheet stays self-sufficient outside wp-admin. */
.tpc-pricing-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* --- intro cell (top-left corner) --- */
.tpc-pricing-compare-intro {
    display: block;
    text-align: left;
}
.tpc-pricing-compare-intro-eyebrow {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tpc-primary);
    margin-bottom: 6px;
}
.tpc-pricing-compare-intro-title {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tpc-heading, var(--tpc-text));
}
.tpc-pricing-compare-intro-note {
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--tpc-muted);
}

/* --- feature rows --- */
.tpc-pricing-compare-feature-desc {
    display: block;
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--tpc-muted);
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-feature-col {
    background: #fff;
    /* Body colour, normal weight: the name of a feature is not a heading, and at
       600 it competed with the group bars above it. --tpc-text is #55504E here,
       the warm grey the mock-up uses for running text. */
    color: var(--tpc-text);
    font-weight: 400;
    font-size: 14.5px;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cell.is-featured {
    background: var(--tpc-bg-soft);
}

/* --- group bars: dark, with the optional icon chip --- */
.tpc-pricing-compare-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 50%;
    background: rgba(188, 0, 0, 0.12);
    color: var(--tpc-primary);
    flex: 0 0 26px;
}
.tpc-pricing-compare-group-icon svg { display: block; }
.tpc-pricing-compare-group-label { vertical-align: middle; }
.tpc-pricing-compare-group-subtitle {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--tpc-muted);
    vertical-align: middle;
}

:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-group-row .tpc-pricing-compare-group-header {
    background: #1a1a18;
    color: #ffffff;
    /* The default skin paints a faint red hairline above each group row and a
       grey one below. Both have to go, or they show as a stray line on the dark
       bar. */
    border-top: 0;
    border-bottom: 0;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-group-icon {
    background: rgba(255, 255, 255, 0.08);
    color: var(--tpc-on-dark);
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-group-subtitle {
    color: var(--tpc-muted-soft);
}

/* --- price suffix on its own line, the way the mock-up sets it --- */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-price .tpc-pricing-price-suffix {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.3;
    color: var(--tpc-muted);
}

/* --- bare tick, no chip: the mock-up puts nothing behind the checkmark --- */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-val-check {
    background: none;
    width: auto;
    height: auto;
    font-size: 16px;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-val-dash {
    color: var(--tpc-border);
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-val-text {
    color: var(--tpc-heading);
    /* 700, not the default 600: with the feature labels dropped to 400 the values
       carry the scan, so they need the contrast. */
    font-weight: 700;
}

/* --- CTA row: text link by default, solid button on the featured column --- */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell .tpc-pricing-cta {
    border-radius: var(--tpc-radius-sharp);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11.5px;
    font-weight: 700;
    padding: 11px 18px;
    width: auto;
    border-color: transparent;
    background: none;
    color: var(--tpc-primary);
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell .tpc-pricing-cta:hover,
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell .tpc-pricing-cta:focus-visible {
    color: var(--tpc-primary-dark);
    background: rgba(188, 0, 0, 0.06);
    border-color: transparent;
}
/* The featured column keeps the solid button — it is the one call to action
   the page is actually steering towards. */
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell.is-featured .tpc-pricing-cta {
    background: var(--tpc-primary);
    color: #fff;
    border-color: var(--tpc-primary);
    padding: 12px 24px;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell.is-featured .tpc-pricing-cta:hover,
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell.is-featured .tpc-pricing-cta:focus-visible {
    background: var(--tpc-primary-dark);
    border-color: var(--tpc-primary-dark);
    color: #fff;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell {
    background: #fff;
}
:is(.tpc-pricing-wrap[data-tpc-skin="trejka"], .tpc-pricing-compare-wrap[data-tpc-skin="trejka"]) .tpc-pricing-compare-cta-cell.is-featured {
    background: var(--tpc-bg-soft);
}

/* --- cards view picks up the warm tokens; only the radii need nudging --- */
.tpc-pricing-wrap[data-tpc-skin="trejka"] .tpc-pricing-card {
    border-radius: var(--tpc-radius-card);
    border-color: var(--tpc-outline);
}
.tpc-pricing-wrap[data-tpc-skin="trejka"] .tpc-pricing-cta {
    border-radius: var(--tpc-radius-sharp);
}

/* ==========================================================================
   v1.12.0 — optional sticky header row (Ustawienia → Wygląd)
   --------------------------------------------------------------------------
   Only the first thead row sticks: the two head rows share `top: 0`, so
   sticking both would overlap them. Sticky needs a non-clipping ancestor, and
   both .tpc-pricing-compare-wrap (overflow-x:auto) and .tpc-pricing-compare-table
   (overflow:hidden, there for the rounded corners) clip — so the sticky variant
   unclips the scroll box once the table fits without scrolling sideways, and
   rounds the four corner cells by hand instead. In a narrower box the table
   keeps its scroll container and simply does not stick.

   The 620px test is a CONTAINER query, not a media query: the table's min-width
   is 600px, and what decides whether it fits is the width of the box it sits in,
   not the width of the screen. A viewport test would un-clip the scroll container
   inside a narrow page-builder column or next to a sidebar — exactly the case
   render_comparison_inline() produces — and the table would then spill over the
   page instead of scrolling inside its own box. Browsers without container-query
   support simply never match, so they keep horizontal scrolling and no sticky
   header, which is the same graceful outcome as a narrow screen.
   ========================================================================== */
.tpc-pricing-compare-wrap.is-sticky {
    container-type: inline-size;
    /* Unconditional, not behind :has(): `is-sticky` only exists on markup this
       version renders, so the inner scroll box is always there. Firefox shipped
       container queries in 110 and :has() in 121 — in that band the query below
       matched while the :has() guard did not, leaving overflow-x:auto on the
       wrapper, which forces overflow-y to auto and makes it the sticky element's
       scrollport. The header then scrolled away with the page. */
    overflow: visible;
}

@container (min-width: 620px) {
    /* Targets a DESCENDANT of the container, never the container itself — an
       element cannot answer its own container query. */
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-scroll { overflow: visible; }
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table {
        overflow: visible !important;
        /* 620px only proves the table's declared min-width fits, not its content.
           Six plan columns with long Polish names need ~900px, and with the scroll
           box unclipped a table that wide simply spilled out of its column and
           pushed the whole page sideways. `table-layout: fixed` removes the guess:
           columns are sized from the header row, so the table can never exceed the
           box it is in. Only inside this block, so nothing else changes. */
        table-layout: fixed;
    }
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table th,
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table td {
        overflow-wrap: break-word;
    }
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table thead tr:first-child th {
        position: -webkit-sticky;
        position: sticky;
        top: var(--tpc-sticky-offset, 0px);
        z-index: 3;
    }
    /* Rounded corners have to be painted on the cells now that the table no
       longer clips its own overflow. */
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table thead tr:first-child th:first-child {
        border-top-left-radius: var(--tpc-radius-card, 12px);
    }
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table thead tr:first-child th:last-child {
        border-top-right-radius: var(--tpc-radius-card, 12px);
    }
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table tbody tr:last-child > *:first-child {
        border-bottom-left-radius: var(--tpc-radius-card, 12px);
    }
    .tpc-pricing-compare-wrap.is-sticky .tpc-pricing-compare-table tbody tr:last-child > *:last-child {
        border-bottom-right-radius: var(--tpc-radius-card, 12px);
    }
}
