/* ==========================================================================
   /planeje — hub, checklists interativos e FAQ (design Love San Bernardino)
   Prefixo .pg-pl-  |  Carregado por último ($lsbPageCss)
   ========================================================================== */

.pg-pl { --pg-required: #b53a17; --pg-conditional: #12466a; --pg-recommended: #1d7a55; }
.pg-pl :is(.lsb-grid, .lsb-card, .pg-pl-item, .pg-pl-card, .pg-pl-panel) { min-width: 0; }

.pg-pl-stack { display: grid; gap: 16px; }
.pg-pl-narrow { max-width: 860px; }
.pg-pl-gap-top { margin-top: clamp(20px, 3vw, 32px); }

/* ---- Avisos ---- */
.pg-pl-callout-title { margin: 0 0 4px; font-size: 1.1rem; line-height: 1.3; color: var(--lsb-lake-900, #0c3550); font-family: var(--lsb-font-body); font-weight: 800; }
.pg-pl-disclaimer p { margin: 0; }
.pg-pl-disclaimer p + p { margin-top: 6px; }
.pg-pl-meta { font-size: .95rem; color: var(--lsb-ink-2, #3f5266); }
.pg-pl-disclaimer--note { background: #fff; }
.pg-pl-disclaimer .lsb-callout__ico { background: #fff; border: 1px solid rgba(43, 90, 117, .15); }
.pg-pl-disclaimer--note .lsb-callout__ico { background: var(--lsb-lake-50, #f2f8fc); }

/* ---- Hub: intenções ---- */
.pg-pl-intents { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pg-pl-intent { gap: 12px; }
.pg-pl-intent .lsb-card__ico { width: 68px; height: 68px; border-radius: 20px; }
.pg-pl-intent h3 { font-size: 1.3rem; }
.pg-pl-more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; min-height: 48px; font-weight: 800; color: var(--lsb-coral-700, #b53a17); }
.pg-pl-more .lsb-i { transition: transform .2s; }
a.lsb-card:hover .pg-pl-more .lsb-i { transform: translateX(4px); }

/* Como usar */
.pg-pl-how { list-style: none; margin: 0; padding: 0; }
.pg-pl-how__item { flex-direction: row; align-items: flex-start; gap: 14px; }
.pg-pl-how__num { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lsb-sun, #f6b042); color: var(--lsb-lake-950, #08283d); font-family: var(--lsb-font-display); font-weight: 700; font-size: 1.3rem; }
.pg-pl-how__item p { font-size: 1.02rem; }

/* Fontes oficiais */
.pg-pl-srcgroup h3 { font-size: 1.2rem; }
.pg-pl-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pg-pl-sources a { display: flex; flex-direction: column; justify-content: center; min-height: 48px; padding: 8px 14px; border-radius: 14px; background: var(--lsb-lake-50, #f2f8fc); border: 1px solid transparent; color: var(--lsb-lake-800, #12466a); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; transition: background .2s, border-color .2s; }
.pg-pl-sources a:hover { background: #fff; border-color: var(--lsb-lake-200, #bcdcee); color: var(--lsb-coral-700, #b53a17); }
.pg-pl-sources__host { font-size: .875rem; font-weight: 500; color: var(--lsb-ink-3, #5f7083); }

/* ---- Painel de progresso ---- */
.pg-pl-top { padding-top: clamp(20px, 3vw, 36px); }
.pg-pl-panel { display: grid; gap: 14px; padding: clamp(18px, 3.4vw, 28px); background: #fff; border: 1px solid var(--lsb-line, #ece2d2); border-radius: 26px; box-shadow: var(--lsb-shadow-2); }
.pg-pl-panel__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.pg-pl-panel__head h2 { margin: 0; font-family: var(--lsb-font-display); font-weight: 650; font-size: clamp(1.35rem, 4vw, 1.8rem); color: var(--lsb-lake-900, #0c3550); }
.pg-pl-panel__count { margin: 0; font-weight: 800; font-size: 1.15rem; color: var(--lsb-lake-800, #12466a); }
.pg-pl-bar { height: 18px; border-radius: 999px; background: var(--lsb-lake-100, #e3f0f8); overflow: hidden; }
.pg-pl-bar > span { display: block; height: 100%; min-width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--lsb-lake-500, #3a8bb8), var(--lsb-sun, #f6b042)); transition: width .45s var(--lsb-ease, ease); }
.pg-pl-panel.is-complete .pg-pl-bar > span { background: linear-gradient(90deg, #2f9e6a, #6fcf97); }
.pg-pl-panel.is-complete .pg-pl-panel__count { color: #1d7a55; }
.pg-pl-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pg-pl-levels__i { display: grid; gap: 2px; align-content: start; padding: 12px 14px; border-radius: 16px; background: var(--lsb-lake-50, #f2f8fc); border-left: 5px solid var(--lsb-lake-500, #3a8bb8); }
.pg-pl-levels__i strong { font-family: var(--lsb-font-display); font-size: 1.7rem; line-height: 1; color: var(--lsb-lake-900, #0c3550); }
.pg-pl-levels__i span { font-size: .875rem; line-height: 1.3; color: var(--lsb-ink-2, #3f5266); font-weight: 600; }
.pg-pl-levels__i--required { border-left-color: var(--pg-required); background: #fff1ec; }
.pg-pl-levels__i--conditional { border-left-color: var(--pg-conditional); background: #eaf3fa; }
.pg-pl-levels__i--recommended { border-left-color: var(--pg-recommended); background: #e9f7ef; }
.pg-pl-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-pl-panel__note { margin: 0; font-size: .95rem; color: var(--lsb-ink-3, #5f7083); line-height: 1.5; }
@media (max-width: 560px) {
    .pg-pl-levels { grid-template-columns: 1fr; }
    .pg-pl-levels__i { grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
    .pg-pl-tools .lsb-btn { flex: 1 1 100%; }
}

/* ---- Navegação por etapas ---- */
.pg-pl-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-pl-jump__label { font-weight: 800; color: var(--lsb-lake-900, #0c3550); margin-right: 4px; }
.pg-pl-jump .lsb-chip { min-height: 48px; padding: 0 18px; font-size: 1rem; }
@media (max-width: 640px) {
    .pg-pl-jump { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-inline: -4px; padding-inline: 4px; scrollbar-width: thin; }
    .pg-pl-jump .lsb-chip { flex: none; }
    .pg-pl-jump__label { flex: none; }
}

/* ---- Etapas ---- */
.pg-pl-phase { scroll-margin-top: 88px; }
.pg-pl-phase__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 18px; align-items: start; margin-bottom: clamp(16px, 3vw, 26px); }
.pg-pl-phase__ico { width: 68px; height: 68px; border-radius: 20px; }
.pg-pl-phase__txt { display: grid; gap: 6px; min-width: 0; }
.pg-pl-phase__txt h2 { margin: 0; font-family: var(--lsb-font-display); font-weight: 650; font-variation-settings: 'SOFT' 100; font-size: clamp(1.45rem, 4.4vw, 2.1rem); line-height: 1.15; color: var(--lsb-lake-900, #0c3550); text-wrap: balance; }
.pg-pl-phase__txt p:not(.lsb-tag) { margin: 0; color: var(--lsb-ink-2, #3f5266); line-height: 1.6; max-width: 62ch; }
.pg-pl-phase__count { margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--lsb-lake-100, #e3f0f8); color: var(--lsb-lake-800, #12466a); font-weight: 800; font-size: 1rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pg-pl-phase.is-done .pg-pl-phase__count { background: #d8f2e4; color: #17603f; }
@media (max-width: 560px) {
    .pg-pl-phase__head { grid-template-columns: auto minmax(0, 1fr); }
    .pg-pl-phase__ico { width: 56px; height: 56px; }
    .pg-pl-phase__count { grid-column: 2; justify-self: start; }
}

/* ---- Itens do checklist ---- */
.pg-pl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pg-pl-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; align-items: start; }

/* Caixa de marcar: 28px visíveis dentro de alvo de toque de 52px */
.pg-pl-check { position: relative; display: grid; place-items: center; width: 52px; height: 64px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pg-pl-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pg-pl-box { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; border: 3px solid var(--lsb-lake-500, #3a8bb8); background: #fff; color: transparent; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.pg-pl-box svg { width: 18px; height: 18px; }
.pg-pl-check:hover .pg-pl-box { border-color: var(--lsb-lake-800, #12466a); transform: scale(1.06); }
.pg-pl-check input:focus-visible + .pg-pl-box { outline: 3px solid var(--lsb-sun, #f6b042); outline-offset: 3px; }
.pg-pl-check input:checked + .pg-pl-box { background: #2f9e6a; border-color: #2f9e6a; color: #fff; }

.pg-pl-card { background: #fff; border: 1px solid var(--lsb-line, #ece2d2); border-left: 6px solid var(--lsb-lake-300, #8fc2de); border-radius: 20px; box-shadow: var(--lsb-shadow-1); transition: box-shadow .2s, border-color .2s, background .2s; }
.pg-pl-item--required .pg-pl-card { border-left-color: var(--pg-required); }
.pg-pl-item--conditional .pg-pl-card { border-left-color: var(--pg-conditional); }
.pg-pl-item--recommended .pg-pl-card { border-left-color: var(--pg-recommended); }
.pg-pl-card[open] { box-shadow: var(--lsb-shadow-2); }
.pg-pl-item.is-checked .pg-pl-card { background: #f3fbf6; border-color: #bfe5cf; }
.pg-pl-item.is-checked .pg-pl-card__ttl h3 { text-decoration: line-through; text-decoration-color: rgba(23, 96, 63, .55); color: var(--lsb-ink-3, #5f7083); }

.pg-pl-card__summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 12px 16px 12px 14px; cursor: pointer; list-style: none; }
.pg-pl-card__summary::-webkit-details-marker { display: none; }
.pg-pl-card__summary:focus-visible { outline: 3px solid var(--lsb-sun, #f6b042); outline-offset: -3px; border-radius: 16px; }
.pg-pl-card__ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #eaf3fa; }
.pg-pl-item--conditional .pg-pl-card__ico { background: #fff2d3; }
.pg-pl-item--recommended .pg-pl-card__ico { background: #e4f4ec; }
.pg-pl-card__ttl { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.pg-pl-card__ttl h3 { margin: 0; font-family: var(--lsb-font-body); font-size: 1.1rem; font-weight: 800; line-height: 1.3; color: var(--lsb-lake-900, #0c3550); overflow-wrap: anywhere; }
.pg-pl-card__chev { display: grid; place-items: center; width: 40px; height: 40px; color: var(--lsb-lake-500, #3a8bb8); transition: transform .25s; }
.pg-pl-card[open] .pg-pl-card__chev { transform: rotate(180deg); }

.pg-pl-badge { display: inline-flex; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 800; letter-spacing: .02em; line-height: 1.4; }
.pg-pl-badge--required { background: #ffe5dc; color: #8c2a0d; }
.pg-pl-badge--conditional { background: #e3f0f8; color: #12466a; }
.pg-pl-badge--recommended { background: #d8f2e4; color: #17603f; }

.pg-pl-card__body { display: grid; gap: 14px; padding: 4px 18px 20px 14px; }
@media (min-width: 720px) { .pg-pl-card__body { padding-left: 74px; } }
.pg-pl-block h3, .pg-pl-block h4 { margin: 0 0 4px; font-family: var(--lsb-font-body); font-size: .8125rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lsb-coral-700, #b53a17); }
.pg-pl-block p { margin: 0; line-height: 1.65; color: var(--lsb-ink, #17283a); font-size: 1.03rem; }

@media (max-width: 480px) {
    .pg-pl-item { grid-template-columns: 44px minmax(0, 1fr); gap: 4px; }
    .pg-pl-check { width: 44px; }
    .pg-pl-card__summary { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px 8px 12px 12px; }
    .pg-pl-card__ico { width: 40px; height: 40px; border-radius: 12px; }
    .pg-pl-card__ico svg { width: 26px; height: 26px; }
    .pg-pl-card__chev { width: 32px; }
}

/* ---- Navegação inferior ---- */
.pg-pl-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.pg-pl-nav .lsb-btn { flex: 1 1 220px; }

/* ---- FAQ ---- */
.pg-pl-faq summary { min-height: 60px; font-size: 1.08rem; line-height: 1.35; }
.pg-pl-faq__body { display: grid; gap: 14px; }
.pg-pl-faq__body > p { color: var(--lsb-ink, #17283a); font-size: 1.05rem; line-height: 1.7; }
.pg-pl-faq details:target { border-color: var(--lsb-sun, #f6b042); box-shadow: 0 0 0 4px rgba(246, 176, 66, .3); }

/* ---- Emergência ---- */
.pg-pl-sos { position: relative; color: #fff; background: linear-gradient(160deg, #12384F 0%, #2B5A75 100%); }
.pg-pl-sos__head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: clamp(18px, 3vw, 30px); }
.pg-pl-sos__ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); }
.pg-pl-sos__head h2 { margin: 0 0 6px; font-family: var(--lsb-font-display); font-weight: 650; font-size: clamp(1.5rem, 4.6vw, 2.2rem); line-height: 1.15; color: #fff; }
.pg-pl-sos__head p { margin: 0; color: rgba(255, 255, 255, .92); line-height: 1.55; max-width: 62ch; }
.pg-pl-sos__tap { margin-top: 6px !important; font-weight: 700; color: var(--lsb-sun-100, #ffe9c2) !important; }
.pg-pl-sos__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.pg-pl-sos__card { display: grid; gap: 4px; justify-items: start; min-width: 0; padding: 18px 18px 16px; border-radius: 22px; background: #fff; color: var(--lsb-lake-900, #0c3550); text-decoration: none; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); transition: transform .2s, box-shadow .2s; }
.pg-pl-sos__card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0, 0, 0, .28); }
.pg-pl-sos__card:focus-visible { outline: 4px solid var(--lsb-sun, #f6b042); outline-offset: 3px; }
.pg-pl-sos__card--main { background: var(--lsb-sun, #f6b042); color: var(--lsb-lake-950, #08283d); }
.pg-pl-sos__num { font-family: var(--lsb-font-display); font-weight: 700; font-size: clamp(2.4rem, 8vw, 3.2rem); line-height: 1; letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.pg-pl-sos__label { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.pg-pl-sos__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; margin-top: 10px; padding: 0 18px; border-radius: 999px; background: var(--lsb-coral, #d6471f); color: #fff; font-weight: 800; font-size: 1.05rem; }
.pg-pl-sos__card--main .pg-pl-sos__btn { background: var(--lsb-lake-950, #08283d); }
.pg-pl-sos__btn .lsb-i { stroke: currentColor; }
@media (max-width: 560px) {
    .pg-pl-sos__head { grid-template-columns: 1fr; }
    .pg-pl-sos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pg-pl-sos__card--main { grid-column: 1 / -1; }
    .pg-pl-sos__card { padding: 14px 12px 12px; }
    .pg-pl-sos__label { font-size: .95rem; }
    .pg-pl-sos__btn { padding: 0 8px; font-size: .98rem; min-height: 52px; }
    .pg-pl-sos__card:last-child:nth-child(even) { grid-column: 1 / -1; }
}

/* ---- Carrossel de lugares relacionados ---- */
.pg-pl-related .places-carousel { margin-bottom: clamp(24px, 4vw, 44px); }
.pg-pl-related .places-carousel:last-child { margin-bottom: 0; }

/* ---- Impressão ---- */
@media print {
    body.lsb27 { background: #fff !important; }
    .lsb-header, .lsb-footer, .lsb-tabbar, .lsb-drawer, .lsb-ph, .site-breadcrumbs, .pg-pl-jump, .pg-pl-tools, .pg-pl-nav,
    .pg-pl-related, .pg-pl-sos, .pg-pl-card__chev, .alert-banner, .cookie-banner, [data-cookie-banner], .lsb-wa, .lsb-fab { display: none !important; }
    .lsb-band { padding-block: 10px !important; background: #fff !important; }
    .pg-pl-panel, .pg-pl-card, .lsb-callout { box-shadow: none !important; break-inside: avoid; }
    .pg-pl-panel { border-radius: 8px; padding: 12px; }
    .pg-pl-card { border-radius: 8px; border: 1px solid #999; border-left-width: 6px; }
    .pg-pl-card__ico { display: none; }
    .pg-pl-card__summary { min-height: 0; padding: 8px 10px; }
    .pg-pl-card__body { padding: 0 12px 10px; }
    .pg-pl-box { border-color: #000; background: #fff !important; color: transparent; width: 22px; height: 22px; border-radius: 4px; }
    .pg-pl-check input:checked + .pg-pl-box { color: #000 !important; background: #fff !important; }
    .pg-pl-check { height: 40px; width: 36px; }
    .pg-pl-item { grid-template-columns: 36px minmax(0, 1fr); break-inside: avoid; }
    .pg-pl-bar { border: 1px solid #999; }
    .pg-pl-bar > span { background: #999 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .pg-pl-sources a { background: none; padding: 2px 0; min-height: 0; }
    a[href^="http"].pg-pl-x::after { content: ""; }
}

@media (prefers-reduced-motion: reduce) {
    .pg-pl-bar > span, .pg-pl-box, .pg-pl-card, .pg-pl-card__chev, .pg-pl-sos__card, .pg-pl-more .lsb-i { transition: none; }
}
