/*
 * Pricing Selector — module stylesheet
 *
 * Design (operator's pick, mockup "v9", 2026-08-27): the whole component
 * sits on a light grey rounded "stage"; segmented tab switcher on a white
 * track; white card with a 1px border and a soft shadow, head (badge, title,
 * price, note) separated from the body by a hairline, a short green rule
 * under the price; green circular check icons; full-width pill button with
 * an arrow; white elevated info box beside the card.
 *
 * HOW TO RESTYLE
 * --------------
 * Everything visual is driven by the custom properties in the two blocks
 * right below:
 *   1. PALETTE   — the handful of base colours, fonts, radii and sizes
 *   2. ELEMENTS  — one token per element (stage, tab, card, price, button…),
 *                  each defaulting to a palette value
 * Change a palette entry to recolour the whole block; change an element
 * token to recolour one thing. The rules further down only consume tokens —
 * they should not need touching for colour/border/background changes.
 *
 * Every selector is qualified with .ea-pricing-selector so the rules beat
 * Salient's generic ones (button, h3, ul, .row .col h3 …). !important is
 * used only where the theme uses it (button border-radius etc.).
 */

/* 1. PALETTE ----------------------------------------------------------- */

.ea-pricing-selector {
    --ea-ps-font-heading: 'Poppins', sans-serif;
    --ea-ps-font-body: 'Lato', sans-serif;

    --ea-ps-green: #00634c;
    --ea-ps-green-dark: #004f38;
    --ea-ps-white: #ffffff;
    --ea-ps-grey: #f2f2f2;
    --ea-ps-grey-stage: #f4f4f4;
    --ea-ps-grey-soft: #f8f8f8;
    --ea-ps-grey-line: #e3e3e3;
    --ea-ps-text: #2b2b2b;
    --ea-ps-text-muted: #6b6b6b;

    --ea-ps-radius: 16px;
    --ea-ps-radius-stage: 24px;
    --ea-ps-radius-button: 999px;
    --ea-ps-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 14px 34px rgba(0, 0, 0, 0.08);

    /* Preferred (flex-basis) widths, not caps: the stage fills its container,
       card and info box share the surplus; the info box wraps under the card
       when card + gap + info no longer fit. Size the block via its container. */
    --ea-ps-card-width: 460px;
    --ea-ps-info-width: 260px;
    --ea-ps-gap: 28px;
    --ea-ps-stage-pad: 28px;
    --ea-ps-card-pad-x: 32px;
}

/* 2. ELEMENTS ---------------------------------------------------------- */

.ea-pricing-selector {
    --ea-ps-stage-bg: var(--ea-ps-grey-stage);

    --ea-ps-tab-track-bg: var(--ea-ps-white);
    --ea-ps-tab-track-border: var(--ea-ps-grey-line);
    --ea-ps-tab-track-pad: 4px;
    --ea-ps-tab-bg: transparent;
    --ea-ps-tab-color: var(--ea-ps-green);
    --ea-ps-tab-hover-bg: var(--ea-ps-grey);
    --ea-ps-tab-hover-color: var(--ea-ps-green);
    --ea-ps-tab-active-bg: var(--ea-ps-green);
    --ea-ps-tab-active-color: var(--ea-ps-white);
    --ea-ps-tab-gap: 4px;

    --ea-ps-card-bg: var(--ea-ps-white);
    --ea-ps-card-border: rgba(0, 0, 0, 0.05);
    --ea-ps-card-shadow: var(--ea-ps-shadow);
    --ea-ps-head-line: var(--ea-ps-grey-line);

    --ea-ps-badge-bg: var(--ea-ps-green);
    --ea-ps-badge-color: var(--ea-ps-white);

    --ea-ps-title-color: var(--ea-ps-text);
    --ea-ps-price-color: var(--ea-ps-green);
    --ea-ps-price-rule: var(--ea-ps-green);
    --ea-ps-note-color: var(--ea-ps-text-muted);

    --ea-ps-perperson-bg: var(--ea-ps-grey-soft);
    --ea-ps-perperson-color: var(--ea-ps-green);
    --ea-ps-perperson-note-color: var(--ea-ps-text-muted);

    --ea-ps-feature-color: var(--ea-ps-text);
    --ea-ps-feature-line: var(--ea-ps-grey-line);
    --ea-ps-check-bg: var(--ea-ps-green);
    --ea-ps-check-color: var(--ea-ps-white);

    --ea-ps-button-bg: var(--ea-ps-green);
    --ea-ps-button-color: var(--ea-ps-white);
    --ea-ps-button-hover-bg: var(--ea-ps-green-dark);
    --ea-ps-button-hover-color: var(--ea-ps-white);
    --ea-ps-button-shadow: 0 8px 20px rgba(0, 99, 76, 0.22);
    --ea-ps-button-hover-shadow: 0 12px 26px rgba(0, 99, 76, 0.3);


    --ea-ps-info-bg: var(--ea-ps-white);
    --ea-ps-info-border: rgba(0, 0, 0, 0.05);
    --ea-ps-info-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    --ea-ps-info-color: var(--ea-ps-text);
    --ea-ps-info-icon-bg: var(--ea-ps-green);
    --ea-ps-info-icon-color: var(--ea-ps-white);
}

/* 3. LAYOUT (stage) ---------------------------------------------------- */

.ea-pricing-selector {
    box-sizing: border-box;
    container-type: inline-size; /* lets the tab layout query the stage width, see 9. */
    width: 100%;
    margin: 0;
    padding: var(--ea-ps-stage-pad);
    background: var(--ea-ps-stage-bg);
    border-radius: var(--ea-ps-radius-stage);
    font-family: var(--ea-ps-font-body);
    color: var(--ea-ps-text);
    line-height: 1.5;
}

.ea-pricing-selector *,
.ea-pricing-selector *::before,
.ea-pricing-selector *::after {
    box-sizing: border-box;
}

.ea-pricing-selector__body {
    display: flex;
    align-items: flex-start;
    gap: var(--ea-ps-gap);
    flex-wrap: wrap;
}

.ea-pricing-selector__panels {
    flex: 1 1 var(--ea-ps-card-width);
    min-width: 0;
}

/* 4. TABS (segmented control, white track on the stage) ---------------- */

.ea-pricing-selector__tabs {
    display: flex;
    gap: var(--ea-ps-tab-gap);
    margin: 0 0 var(--ea-ps-gap);
    padding: var(--ea-ps-tab-track-pad);
    background: var(--ea-ps-tab-track-bg);
    border: 1px solid var(--ea-ps-tab-track-border);
    border-radius: var(--ea-ps-radius-button);
}

.ea-pricing-selector .ea-pricing-selector__tab {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: var(--ea-ps-radius-button) !important;
    background: var(--ea-ps-tab-bg) !important;
    color: var(--ea-ps-tab-color) !important;
    font-family: var(--ea-ps-font-heading);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-transform: none;
    text-align: center;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ea-pricing-selector .ea-pricing-selector__tab:hover,
.ea-pricing-selector .ea-pricing-selector__tab:focus-visible {
    background: var(--ea-ps-tab-hover-bg) !important;
    color: var(--ea-ps-tab-hover-color) !important;
    outline: none;
}

.ea-pricing-selector .ea-pricing-selector__tab:focus-visible {
    box-shadow: 0 0 0 2px var(--ea-ps-green) !important;
}

.ea-pricing-selector .ea-pricing-selector__tab.is-active {
    background: var(--ea-ps-tab-active-bg) !important;
    color: var(--ea-ps-tab-active-color) !important;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 99, 76, 0.3) !important;
}

/* 5. CARD -------------------------------------------------------------- */

.ea-pricing-selector__card {
    position: relative;
    padding: 34px var(--ea-ps-card-pad-x) 30px;
    background: var(--ea-ps-card-bg);
    border: 1px solid var(--ea-ps-card-border);
    border-radius: var(--ea-ps-radius);
    box-shadow: var(--ea-ps-card-shadow);
    text-align: center;
}

.ea-pricing-selector__head {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ea-ps-head-line);
}

.ea-pricing-selector__content {
    padding-top: 22px;
}

.ea-pricing-selector__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 18px;
    padding: 6px 15px;
    background: var(--ea-ps-badge-bg);
    border-radius: var(--ea-ps-radius-button);
    color: var(--ea-ps-badge-color);
    font-family: var(--ea-ps-font-body);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
}

.ea-pricing-selector__badge::before {
    content: '';
    width: 12px;
    height: 12px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ea-pricing-selector .ea-pricing-selector__title {
    margin: 0 0 12px;
    padding: 0;
    color: var(--ea-ps-title-color);
    font-family: var(--ea-ps-font-heading);
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-transform: none;
}

.ea-pricing-selector .ea-pricing-selector__price {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.15em;
    margin: 0 0 12px;
    padding: 0 0 16px;
    white-space: nowrap;
    color: var(--ea-ps-price-color);
    font-family: var(--ea-ps-font-heading);
    font-size: 58px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

/* short rule under the price */
.ea-pricing-selector .ea-pricing-selector__price::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 36px;
    height: 3px;
    transform: translateX(-50%);
    background: var(--ea-ps-price-rule);
    border-radius: 3px;
}

.ea-pricing-selector__currency {
    font-size: 0.45em;
    font-weight: 600;
    letter-spacing: 0;
}

.ea-pricing-selector .ea-pricing-selector__note {
    margin: 0;
    padding: 0;
    color: var(--ea-ps-note-color);
    font-size: 14.5px;
    line-height: 1.5;
}

/* per-person price: a full-width band between the head and the content
   (negative margins cancel the card padding), value in the price's font
   and colour, disclaimer beside it — one line on desktop, two on mobile */
.ea-pricing-selector .ea-pricing-selector__per-person {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 2px 12px;
    margin: 0 calc(-1 * var(--ea-ps-card-pad-x));
    padding: 12px var(--ea-ps-card-pad-x);
    background: var(--ea-ps-perperson-bg);
    line-height: 1.4;
    text-align: center;
}

/* the band replaces the head's hairline (which stops at the card padding) */
.ea-pricing-selector .ea-pricing-selector__card.has-per-person .ea-pricing-selector__head {
    border-bottom: 0;
}

.ea-pricing-selector .ea-pricing-selector__per-person-value {
    color: var(--ea-ps-perperson-color);
    font-family: var(--ea-ps-font-heading);
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.ea-pricing-selector .ea-pricing-selector__per-person-note {
    color: var(--ea-ps-perperson-note-color);
    font-size: 13px;
}

/* 6. FEATURE LIST ------------------------------------------------------ */

.ea-pricing-selector .ea-pricing-selector__features {
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
    text-align: left;
}

.ea-pricing-selector .ea-pricing-selector__features li {
    position: relative;
    margin: 0;
    padding: 11px 0 11px 36px;
    border-bottom: 1px solid var(--ea-ps-feature-line);
    color: var(--ea-ps-feature-color);
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.45;
    list-style: none;
}

.ea-pricing-selector .ea-pricing-selector__features li:last-child {
    border-bottom: 0;
}

.ea-pricing-selector .ea-pricing-selector__features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 22px;
    height: 22px;
    background: var(--ea-ps-check-bg);
    border-radius: 50%;
}

.ea-pricing-selector .ea-pricing-selector__features li::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 16px;
    width: 12px;
    height: 12px;
    background: var(--ea-ps-check-color);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 17.2L4.3 12l1.9-1.9 3.3 3.3 8.3-8.3 1.9 1.9z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 17.2L4.3 12l1.9-1.9 3.3 3.3 8.3-8.3 1.9 1.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 7. BUTTON ------------------------------------------------------------ */

.ea-pricing-selector .ea-pricing-selector__button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 17px 28px;
    background: var(--ea-ps-button-bg);
    border: 0;
    border-radius: var(--ea-ps-radius-button);
    color: var(--ea-ps-button-color);
    font-family: var(--ea-ps-font-heading);
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    box-shadow: var(--ea-ps-button-shadow);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.ea-pricing-selector .ea-pricing-selector__button::after {
    content: '';
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11h12.2l-4.6-4.6L13 5l7 7-7 7-1.4-1.4 4.6-4.6H4z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 11h12.2l-4.6-4.6L13 5l7 7-7 7-1.4-1.4 4.6-4.6H4z'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s ease;
}

.ea-pricing-selector .ea-pricing-selector__button:hover,
.ea-pricing-selector .ea-pricing-selector__button:focus-visible {
    background: var(--ea-ps-button-hover-bg);
    color: var(--ea-ps-button-hover-color);
    box-shadow: var(--ea-ps-button-hover-shadow);
    text-decoration: none;
    transform: translateY(-2px);
}

.ea-pricing-selector .ea-pricing-selector__button:hover::after {
    transform: translateX(4px);
}

/* 8. INFO BOX ---------------------------------------------------------- */

.ea-pricing-selector__info {
    flex: 1 1 var(--ea-ps-info-width);
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 0;
    padding: 16px 18px 16px 14px;
    background: var(--ea-ps-info-bg);
    border: 1px solid var(--ea-ps-info-border);
    border-radius: var(--ea-ps-radius);
    box-shadow: var(--ea-ps-info-shadow);
    color: var(--ea-ps-info-color);
    font-size: 14.5px;
    line-height: 1.55;
}

.ea-pricing-selector .ea-pricing-selector__info p {
    margin: 0;
    padding: 0;
}

.ea-pricing-selector__info-icon {
    position: relative;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    background: var(--ea-ps-info-icon-bg);
    border-radius: 50%;
}

.ea-pricing-selector__info-icon::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: var(--ea-ps-info-icon-color);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 1.8a8.2 8.2 0 1 1 0 16.4 8.2 8.2 0 0 1 0-16.4zM11 10h2v7h-2zm0-3h2v2h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 1.8a8.2 8.2 0 1 1 0 16.4 8.2 8.2 0 0 1 0-16.4zM11 10h2v7h-2zm0-3h2v2h-2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 9. RESPONSIVE -------------------------------------------------------- */

/* Card / info side-by-side vs stacked is decided by the container width
   (flex-wrap on __body), not by a viewport query. */

@media (max-width: 690px) {
    .ea-pricing-selector {
        --ea-ps-stage-pad: 14px;
        --ea-ps-card-pad-x: 20px;
        --ea-ps-radius-stage: 18px;
    }

    .ea-pricing-selector .ea-pricing-selector__tab {
        padding: 11px 8px;
        font-size: 14px;
    }

    .ea-pricing-selector__card {
        padding: 28px var(--ea-ps-card-pad-x) 24px;
    }

    .ea-pricing-selector .ea-pricing-selector__title {
        font-size: 20px;
    }

    .ea-pricing-selector .ea-pricing-selector__price {
        font-size: 44px;
    }

    .ea-pricing-selector .ea-pricing-selector__per-person {
        flex-direction: column;
        align-items: center; /* baseline (desktop) means flex-start in a column */
        gap: 0;
        padding: 10px var(--ea-ps-card-pad-x);
    }

    .ea-pricing-selector .ea-pricing-selector__per-person-value {
        font-size: 16px;
    }

    /* Salient's container leaves ~300px for the card at 390px: keep the label on one line */
    .ea-pricing-selector .ea-pricing-selector__button {
        padding: 15px 16px;
        font-size: 14.5px;
        letter-spacing: 0.04em;
    }

    .ea-pricing-selector__info {
        display: none;
    }
}

/* Tabs: 2×2 grid as soon as the stage is too narrow for four labels on one
   line (four "do 30 osób"-sized pills need ~480px at desktop sizes; 520px
   leaves headroom). Queried on the stage's content width, so it also fires
   in a narrow desktop column. Browsers without @container (pre-2023) fall
   back to a viewport query. */
@container (max-width: 520px) {
    .ea-pricing-selector__tabs {
        flex-wrap: wrap;
        border-radius: var(--ea-ps-radius);
    }

    .ea-pricing-selector .ea-pricing-selector__tab {
        flex: 1 1 calc(50% - var(--ea-ps-tab-gap));
    }
}

@supports not (container-type: inline-size) {
    @media (max-width: 600px) {
        .ea-pricing-selector__tabs {
            flex-wrap: wrap;
            border-radius: var(--ea-ps-radius);
        }

        .ea-pricing-selector .ea-pricing-selector__tab {
            flex: 1 1 calc(50% - var(--ea-ps-tab-gap));
        }
    }
}
