/*
 * Plans side by side (components/planos-comparacao): heads, highlights and the table by section,
 * one column per plan, the chosen (or most chosen) one standing out. Shared by the panel
 * (--tema-* colors, dark mode included) and the landing (its own colors).
 */
.pc {
    --pc-ink: var(--tema-ink, var(--ink, #1d3557));
    --pc-text: var(--tema-text, var(--text, #334155));
    --pc-muted: var(--tema-muted, var(--muted, #64748b));
    --pc-line: var(--tema-line, var(--line, #e2e8f0));
    --pc-line-strong: var(--tema-line-strong, #cbd5e1);
    --pc-paper: var(--tema-paper, var(--bg, #ffffff));
    --pc-soft: var(--tema-bg, var(--bg-soft, #f5f8fb));
    --pc-green: var(--tema-green, var(--green, #166923));
    --pc-green-dark: var(--tema-green-dark, var(--green-dark, #10561c));
    --pc-green-soft: var(--tema-green-soft, var(--green-soft, #e8f5ea));
    container-type: inline-size;
    overflow-x: auto;
    color: var(--pc-text);
    text-align: left;
}

.pc-grid {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) repeat(var(--pc-cols), minmax(0, 1.2fr));
    min-width: 0;
}

.pc-col {
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
}

.pc-col.is-on {
    background: var(--pc-paper);
    border-left-color: var(--pc-line-strong);
    border-right-color: var(--pc-line-strong);
}

.pc-col.is-on.is-first {
    border-top: 1px solid var(--pc-line-strong);
    border-radius: 14px 14px 0 0;
}

.pc-col.is-on.is-last {
    border-bottom: 1px solid var(--pc-line-strong);
    border-radius: 0 0 14px 14px;
}

/* Heads */
.pc-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 16px 16px;
}

.pc-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--pc-ink);
    font-size: 17px;
    font-weight: 700;
}

.pc-name img {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
}

.pc-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--pc-green-soft);
    color: var(--pc-green);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pc-price {
    margin: 2px 0 0;
    color: var(--pc-ink);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.pc-price small {
    margin-left: 4px;
    color: var(--pc-muted);
    font-size: 12.5px;
    font-weight: 500;
}

.pc-price-old {
    color: var(--pc-muted);
    font-size: 13px;
}

.pc-price-note {
    margin: 0;
    color: var(--pc-muted);
    font-size: 12.5px;
}

.pc-tagline {
    margin: 0;
    min-height: 2.6em;
    color: var(--pc-muted);
    font-size: 13.5px;
    line-height: 1.35;
}

.pc-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--pc-line-strong);
    border-radius: 10px;
    background: var(--pc-paper);
    color: var(--pc-ink) !important;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.pc-action:hover {
    border-color: var(--pc-green);
}

.pc-action-primary,
.pc-col.is-on .pc-action-choose {
    border-color: var(--pc-green);
    background: var(--pc-green);
    color: #fff !important;
}

.pc-action-primary:hover {
    background: var(--pc-green-dark);
}

.pc-action[aria-disabled='true'],
.pc-action:disabled {
    border-color: var(--pc-line);
    background: transparent;
    color: var(--pc-muted) !important;
    cursor: default;
}

/* Every head keeps the badge's line, so the names and prices line up */
.pc-badge.is-empty {
    visibility: hidden;
}

/* Folded table (checkout): only the heads and the highlights until "Ver comparação completa" */
.pc:not(.is-full) .pc-tbl {
    display: none;
}

.pc.is-full .pc-hl.is-last {
    border-bottom: 0;
    border-radius: 0;
}

.pc:not(.is-full) .pc-more {
    display: block;
    margin: 14px auto 0;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--pc-green);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.pc-more:hover {
    background: var(--pc-green-soft);
}

/* Checkout: the whole head is the radio's label */
.pc-pick {
    display: contents;
    cursor: pointer;
}

.pc-pick input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pc-pick input:focus-visible ~ .pc-action {
    outline: 2px solid var(--pc-green);
    outline-offset: 2px;
}

.pc-action-choose .pc-when-on,
.pc-col.is-on .pc-action-choose .pc-when-off {
    display: none;
}

.pc-col.is-on .pc-action-choose .pc-when-on {
    display: inline;
}

/* Rows */
.pc-label,
.pc-section,
.pc-cell {
    padding: 12px 16px;
}

.pc-label-hl,
.pc-hl {
    background: var(--pc-soft);
}

.pc-hl.is-on {
    background: var(--pc-paper);
}

.pc-label-hl,
.pc-section {
    color: var(--pc-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pc-label-hl {
    padding-top: 18px;
}

.pc-hl {
    padding-top: 16px;
    padding-bottom: 22px;
}

.pc-hl-title {
    margin: 0 0 10px;
    color: var(--pc-ink);
    font-size: 13.5px;
    font-weight: 700;
}

.pc-checks {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13.5px;
    line-height: 1.4;
}

.pc-checks li {
    position: relative;
    padding-left: 22px;
}

.pc-checks li::before {
    content: '✓';
    position: absolute;
    left: 2px;
    top: 0;
    color: var(--pc-green);
    font-weight: 800;
}

.pc-section {
    padding-top: 30px;
    padding-bottom: 8px;
}

.pc-gap {
    padding: 0;
}

.pc-label,
.pc-value {
    border-bottom: 1px solid var(--pc-line);
    font-size: 14px;
}

.pc-label {
    color: var(--pc-ink);
    font-weight: 600;
}

.pc-value {
    display: flex;
    align-items: center;
    color: var(--pc-ink);
    font-weight: 600;
}

.pc-value.is-last {
    border-bottom: 1px solid var(--pc-line-strong);
}

.pc-value-addon {
    color: var(--pc-muted);
    font-size: 13px;
    font-weight: 500;
}

.pc-yes {
    color: var(--pc-green);
    font-size: 16px;
    font-weight: 800;
}

.pc-no {
    color: var(--pc-line-strong);
}

/* Narrow (the sign-up card, phones): no label column; each row's name goes on a line of its own
   above the values, and the plans scroll sideways when they don't fit */
@container (max-width: 760px) {
    .pc-grid {
        grid-template-columns: repeat(var(--pc-cols), minmax(150px, 1fr));
    }

    .pc-corner,
    .pc-label-hl,
    .pc-gap {
        display: none;
    }

    .pc-label,
    .pc-section {
        grid-column: 1 / -1;
        position: sticky;
        left: 0;
    }

    .pc-label {
        padding-bottom: 2px;
        border-bottom: 0;
        color: var(--pc-muted);
        font-size: 12.5px;
        font-weight: 600;
    }

    .pc-hl {
        border-radius: 0;
    }

    .pc-head {
        padding: 14px 12px;
    }

    .pc-cell {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Phones: one card per plan (its head over its highlights), stacked; the table by section is left
   to bigger screens */
@container (max-width: 520px) {
    .pc {
        overflow-x: visible;
    }

    .pc-grid {
        display: flex;
        flex-direction: column;
    }

    .pc-tbl,
    .pc-more {
        display: none !important;
    }

    .pc-head,
    .pc-hl {
        border: 1px solid var(--pc-line-strong);
        background: var(--pc-paper);
    }

    .pc-head {
        order: calc(var(--pc-i) * 2);
        border-bottom: 0;
        border-radius: 14px 14px 0 0;
    }

    .pc-hl,
    .pc:not(.is-full) .pc-hl,
    .pc.is-full .pc-hl.is-last {
        order: calc(var(--pc-i) * 2 + 1);
        margin-bottom: 14px;
        border-top: 0;
        border-bottom: 1px solid var(--pc-line-strong);
        border-radius: 0 0 14px 14px;
    }

    .pc-col.is-on {
        border-color: var(--pc-green);
    }

    .pc-tagline {
        min-height: 0;
    }

    .pc-badge.is-empty {
        display: none;
    }
}
