/*
 * Painel da rede (pesquisa de desconto): indicadores mostrados antes da
 * primeira busca. Usado na pesquisa pública e na Área do Cliente.
 * As cores seguem o tema da Área do Cliente quando existe (theme.css) e caem
 * no claro na página pública, que não carrega o tema.
 */
.pr {
    --pr-navy: #1e3a5f;
    --pr-navy-2: #2b5283;
    --pr-orange: #f97316;
    --pr-orange-soft: rgba(249, 115, 22, 0.12);
    --pr-surface: var(--bg-primary, #ffffff);
    --pr-text: var(--text-primary, #111827);
    --pr-muted: var(--text-secondary, #6b7280);
    --pr-border: var(--border-color, #e5e7eb);
    --pr-track: rgba(30, 58, 95, 0.08);
    color: var(--pr-text);
    margin-bottom: 1.5rem;
    animation: pr-entra 0.45s ease both;
}
[data-theme="dark"] .pr, .dark .pr {
    --pr-track: rgba(255, 255, 255, 0.08);
}
.pr[hidden], .pr-cat[hidden] { display: none; }

@keyframes pr-entra {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- Destaque ---------- */
.pr-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    padding: 1.75rem 1.5rem;
    background:
        radial-gradient(circle at 92% 10%, rgba(249, 115, 22, 0.35), transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(59, 130, 246, 0.35), transparent 45%),
        linear-gradient(135deg, var(--pr-navy) 0%, #13263f 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(19, 38, 63, 0.18);
}
.pr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fdba74;
}
.pr-eyebrow::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}
.pr-titulo {
    margin: 0.5rem 0 0.25rem;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 800;
}
.pr-sub {
    margin: 0;
    font-size: 0.9rem;
    color: #c7d6ea;
}
.pr-selo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    font-weight: 600;
}
.pr-selo b { color: #fdba74; }

.pr-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.pr-stat {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    min-width: 0;
}
.pr-stat-ico {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
}
.pr-stat-ico svg { width: 1.25rem; height: 1.25rem; }
.pr-stat-num {
    display: block;
    margin-top: 0.6rem;
    font-size: 1.85rem;
    line-height: 1;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}
.pr-stat-rot {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: #c7d6ea;
}

/* ---------- Corpo: categorias + cidades ---------- */
.pr-corpo {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.pr-bloco {
    padding: 1.25rem;
    border-radius: 1.25rem;
    background: var(--pr-surface);
    border: 1px solid var(--pr-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    min-width: 0;
}
.pr-bloco-cab {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.pr-bloco-tit {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--pr-text);
}
.pr-bloco-dica {
    font-size: 0.75rem;
    color: var(--pr-muted);
}

.pr-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}
.pr-cat {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.9rem;
    border: 1px solid var(--pr-border);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
    min-width: 0;
}
.pr-cat:hover, .pr-cat:focus-visible {
    border-color: var(--pr-orange);
    background: var(--pr-orange-soft);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.12);
    outline: none;
}
.pr-cat-ico {
    flex-shrink: 0;
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    background: var(--pr-orange-soft);
    color: var(--pr-orange);
}
.pr-cat-ico svg { width: 1.15rem; height: 1.15rem; }
.pr-cat-txt { min-width: 0; flex: 1; }
.pr-cat-nome {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pr-cat-qtd {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: var(--pr-muted);
}
.pr-mais {
    display: block;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.6rem;
    border-radius: 0.75rem;
    border: 1px dashed var(--pr-border);
    background: transparent;
    color: var(--pr-orange);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}
.pr-mais:hover { background: var(--pr-orange-soft); border-color: var(--pr-orange); }

.pr-cidades { list-style: none; margin: 0; padding: 0; }
.pr-cidade + .pr-cidade { margin-top: 0.35rem; }
.pr-cidade button {
    display: block;
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 0;
    border-radius: 0.7rem;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.pr-cidade button:hover, .pr-cidade button:focus-visible {
    background: var(--pr-orange-soft);
    outline: none;
}
.pr-cidade-linha {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.82rem;
}
.pr-cidade-nome { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-cidade-qtd { color: var(--pr-muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.pr-barra {
    margin-top: 0.35rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--pr-track);
    overflow: hidden;
}
.pr-barra span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pr-navy-2), var(--pr-orange));
    transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pr-rodape-cid {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--pr-muted);
    text-align: center;
}

/* ---------- Carregando ---------- */
.pr-esqueleto .pr-stat-num,
.pr-esqueleto .pr-cats,
.pr-esqueleto .pr-cidades {
    color: transparent;
}
.pr-pulso {
    border-radius: 0.6rem;
    background: var(--pr-track);
    animation: pr-pulso 1.2s ease-in-out infinite;
}
@keyframes pr-pulso { 50% { opacity: 0.45; } }

/* ---------- Tamanhos ---------- */
@media (min-width: 640px) {
    .pr-hero { padding: 2rem; }
    .pr-titulo { font-size: 1.75rem; }
    .pr-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .pr-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pr-stat-num { font-size: 2.25rem; }
    .pr-corpo { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .pr, .pr-pulso { animation: none; }
    .pr-cat, .pr-barra span { transition: none; }
}
