/* ═══════════════════════════════════════════════════════════════════════
   Theme: POP — topo e rodapé (header.php / footer.php)
   Carregado pelo index.php só quando o tema ativo tem layout.css.
   Cores: só variáveis do painel e derivadas (ver style.css).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Topo ──────────────────────────────────────────────────────────── */
/* O getThemeCSS aplica padding/min-height do logo em `header` (com
   !important): o <header> é só um invólucro transparente; a barra é o
   que aparece. */
body header.pop-top {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    padding: 12px var(--pop-gutter) 0 !important;
    min-height: 0 !important;
    background: transparent;
    pointer-events: none;
}
.pop-top__bar {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: var(--pop-wrap);
    min-height: 68px;
    margin: 0 auto;
    padding: 8px 10px 8px 20px;
    border: var(--pop-bw) solid var(--pop-text);
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    box-shadow: 4px 4px 0 var(--pop-text);
    pointer-events: auto;
    transition: min-height .2s var(--pop-ease), box-shadow .2s;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .pop-top__bar { background: var(--bg-primary); }
}
.pop-top.header-scrolled .pop-top__bar { min-height: 60px; box-shadow: 3px 3px 0 var(--pop-text); }

.pop-top__logo { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; color: var(--pop-text); }
/* Tamanho do logo: Cores e Estilos › Logotipo (getThemeCSS, com !important em
   `header img[src*='uploads/media']` e `[data-ag-drawer] …`). Sem teto aqui: a
   barra cresce com o logo (min-height). Só o texto do nome tem estilo próprio. */
.pop-top__logo img { display: block; }
.pop-top__logo-text {
    font-family: var(--page-title-font-family);
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--pop-text);
}

/* Menu central */
.pop-nav { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; min-width: 0; }
.pop-nav__list { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: 0; overflow: hidden; }
body .pop-nav li.pop-nav__item { flex-shrink: 0; }
.pop-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: none;
    font-family: var(--nav-font-family);
    font-size: var(--nav-font-size);
    font-weight: var(--nav-font-weight);
    font-style: var(--nav-font-style);
    color: var(--nav-color);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, transform .15s var(--pop-ease);
}
.pop-nav__label, .pop-nav__ico { color: var(--nav-color); }
.pop-nav__ico { display: inline-grid; place-items: center; flex-shrink: 0; }
.pop-nav__ico svg { width: 20px; height: 20px; }
.pop-nav--text .pop-nav__label { text-transform: uppercase; letter-spacing: .04em; }
.pop-nav__link:hover { border-color: color-mix(in srgb, var(--pop-text) 30%, transparent); }
/* Menu Texto: ativo sublinhado na cor secundária. */
.pop-nav--text .pop-nav__link.is-active .pop-nav__label {
    text-decoration: underline;
    text-decoration-color: var(--pop-s);
    text-decoration-thickness: 4px;
    text-underline-offset: 8px;
}
/* Horizontal Expansível com Ícones: só o ícone; o nome abre no hover, no
   foco e no item ativo (fica no nome acessível sempre). */
.pop-nav--icons .pop-nav__link { padding: 0 11px; }
.pop-nav--icons .pop-nav__label {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    margin-left: -8px;
    transition: max-width .3s var(--pop-ease), opacity .2s, margin .3s var(--pop-ease);
}
.pop-nav--icons .pop-nav__link:hover .pop-nav__label,
.pop-nav--icons .pop-nav__link:focus-visible .pop-nav__label,
.pop-nav--icons .pop-nav__link.is-active .pop-nav__label,
.pop-nav--icons .pop-nav__more-btn .pop-nav__label {
    max-width: 14em;
    opacity: 1;
    margin-left: 0;
}
.pop-nav--icons .pop-nav__link.is-active {
    background: var(--pop-p);
    border-color: var(--pop-text);
}
.pop-nav--icons .pop-nav__link.is-active .pop-nav__label,
.pop-nav--icons .pop-nav__link.is-active .pop-nav__ico { color: var(--pop-on-p); }
.pop-nav--icons .pop-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: -9px;
    width: 26px; height: 5px;
    transform: translateX(-50%);
    border-radius: 3px;
    background: var(--pop-s);
}

/* "Mais" */
.pop-nav__more { position: relative; flex-shrink: 0; }
.pop-nav__more[hidden] { display: none; }
.pop-nav__more-btn .pop-ico--sm { width: 16px; height: 16px; color: var(--nav-color); }
.pop-nav__more-list {
    position: absolute;
    top: calc(100% + 14px); right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: var(--pop-bw) solid var(--pop-text);
    border-radius: 20px;
    background: var(--bg-card);
    box-shadow: 5px 5px 0 var(--pop-text);
}
.pop-nav__more.is-open .pop-nav__more-list { display: flex; }
.pop-nav__more-list .pop-nav__link { width: 100%; justify-content: flex-start; border-radius: 12px; }
.pop-nav__more-list .pop-nav__label { max-width: none !important; opacity: 1 !important; margin: 0 !important; }
.pop-nav__more-btn.is-active { border-color: var(--pop-s); }

/* Ações */
.pop-top__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pop-top__city:empty { display: none; }
.pop-top__btn {
    display: inline-grid;
    place-items: center;
    width: 46px; height: 46px;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid var(--pop-text);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--pop-text);
    cursor: pointer;
    transition: transform .15s var(--pop-ease), box-shadow .15s;
}
.pop-top__btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--pop-text); }
.pop-ico { width: 22px; height: 22px; }
.pop-ico--spin { animation: pop-spin 1s linear infinite; }
@keyframes pop-spin { to { transform: rotate(360deg); } }
.pop-top__burger { display: none; }

/* Botão "ao vivo" */
.pop-live {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    max-width: 260px;
    padding: 0 18px 0 14px;
    border: 2px solid var(--pop-text);
    border-radius: 999px;
    background: var(--pop-p);
    color: var(--pop-on-p);
    cursor: pointer;
    text-align: left;
    transition: transform .15s var(--pop-ease), box-shadow .15s;
}
.pop-live:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--pop-text); }
.pop-live__dot {
    width: 10px; height: 10px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--pop-t);
    box-shadow: 0 0 0 2px var(--pop-on-p);
}
.pop-live[data-state="playing"] .pop-live__dot, .pop-live[data-state="loading"] .pop-live__dot { display: none; }
.pop-eq { display: none; align-items: flex-end; gap: 2px; height: 16px; }
.pop-eq i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: pop-eq .9s ease-in-out infinite; }
.pop-eq i:nth-child(2) { animation-delay: -.3s; }
.pop-eq i:nth-child(3) { animation-delay: -.6s; }
.pop-live[data-state="playing"] .pop-eq, .pop-live[data-state="loading"] .pop-eq { display: inline-flex; }
.pop-live[data-state="loading"] .pop-eq i { animation-duration: .4s; }
@keyframes pop-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.pop-live__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.1; }
.pop-live__label { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pop-live__show {
    font-family: var(--page-title-font-family);
    font-weight: 700;
    font-size: .95rem;
    text-transform: uppercase;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pop-no-player .pop-live { display: none; }

/* Busca em tela cheia */
.pop-find { position: fixed; inset: 0; z-index: 10020; display: flex; justify-content: center; align-items: flex-start; padding: 12vh var(--pop-gutter) 24px; }
.pop-find[hidden] { display: none; }
.pop-find__backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--pop-p) 82%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pop-find__box {
    position: relative;
    width: min(720px, 100%);
    max-height: 76vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: var(--pop-bw) solid var(--pop-text);
    border-radius: 26px;
    background: var(--bg-card);
    color: var(--pop-text);
    box-shadow: 8px 8px 0 var(--pop-text);
    transform: translateY(10px) rotate(-.6deg);
    opacity: 0;
    transition: transform .25s var(--pop-ease), opacity .2s;
}
.pop-find.is-open .pop-find__box { transform: none; opacity: 1; }
.pop-find__form { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 18px; border-bottom: var(--pop-bw) solid var(--pop-text); }
.pop-find__icon { display: grid; place-items: center; color: var(--pop-p-ink); }
.pop-find__input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 0;
    background: transparent;
    font-family: var(--page-title-font-family);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pop-text);
    outline: none;
}
.pop-find__input::placeholder { color: var(--pop-text-2); opacity: 1; font-weight: 500; }
.pop-find__spinner { display: grid; place-items: center; color: var(--pop-text-2); }
.pop-find__results { overflow-y: auto; }

/* Folha do celular */
.pop-sheet { position: fixed; inset: 0; z-index: 10010; }
.pop-sheet[hidden] { display: none; }
.pop-sheet__backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--pop-text) 45%, transparent); opacity: 0; transition: opacity .25s; }
.pop-sheet.is-open .pop-sheet__backdrop { opacity: 1; }
.pop-sheet__panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: max(16px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    background-color: var(--bg-primary);
    background-image: radial-gradient(var(--pop-dots) 1.3px, transparent 1.7px);
    background-size: 20px 20px;
    border-left: var(--pop-bw) solid var(--pop-text);
    transform: translateX(100%);
    transition: transform .3s var(--pop-ease);
}
.pop-sheet.is-open .pop-sheet__panel { transform: none; }
.pop-sheet__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pop-live--sheet { max-width: none; width: 100%; }
.pop-sheet__search {
    display: flex; align-items: center; gap: 10px;
    min-height: 50px;
    padding: 0 16px;
    border: 2px solid var(--pop-text);
    border-radius: 999px;
    background: var(--bg-card);
    color: var(--pop-text);
    font-weight: 700;
    cursor: pointer;
}
.pop-sheet__list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pop-sheet__link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 8px 16px;
    border: 2px solid var(--pop-text);
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--pop-text);
    text-decoration: none;
}
.pop-sheet__link .pop-nav__ico { color: var(--pop-text); }
.pop-sheet__num { font-family: var(--page-title-font-family); font-weight: 700; font-size: .85rem; color: var(--pop-p-ink); min-width: 2ch; }
.pop-sheet__label {
    font-family: var(--nav-font-family);
    font-weight: 700;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pop-sheet__link.is-active { background: var(--pop-p); color: var(--pop-on-p); box-shadow: 4px 4px 0 var(--pop-text); }
.pop-sheet__link.is-active .pop-sheet__num, .pop-sheet__link.is-active .pop-nav__ico { color: var(--pop-on-p); }
.pop-sheet__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.pop-social {
    display: inline-grid;
    place-items: center;
    width: 44px; height: 44px;
    border: 2px solid currentColor;
    border-radius: 50%;
    color: var(--pop-text);
    text-decoration: none;
    font-size: 1.05rem;
    transition: transform .15s var(--pop-ease), background-color .15s;
}
.pop-social:hover { transform: rotate(-8deg) scale(1.06); }

body.pop-locked { overflow: hidden; }

/* ── Rodapé ────────────────────────────────────────────────────────── */
.pop-ft {
    position: relative;
    overflow: hidden;
    margin-top: clamp(48px, 6vw, 80px);
    padding: clamp(48px, 6vw, 84px) 0 calc(24px + var(--pop-bottom-space, 0px));
    background-color: var(--pop-p);
    background-image: radial-gradient(color-mix(in srgb, var(--pop-on-p) 16%, transparent) 1.3px, transparent 1.7px);
    background-size: 22px 22px;
    border-top: var(--pop-bw) solid var(--pop-text);
    color: var(--pop-on-p);
    --text-primary: var(--pop-on-p);
    --body-font-color: var(--pop-on-p);
    --pop-line: var(--pop-on-p);
}
/* Na home a última seção já tem respiro próprio: o rodapé encosta nela. */
.page-home .pop-ft { margin-top: 0; }
.pop-ft__mark {
    position: absolute;
    left: 50%; bottom: -.16em;
    transform: translateX(-50%);
    font-family: var(--page-title-font-family);
    font-weight: 700;
    font-size: clamp(5rem, 18vw, 18rem);
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    color: var(--pop-on-p);
    opacity: .08;
    pointer-events: none;
    user-select: none;
}
.pop-ft__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 56px);
    max-width: var(--pop-wrap);
    margin: 0 auto;
    padding: 0 var(--pop-gutter);
}
.pop-ft__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.pop-ft__logo img { display: block; max-height: 64px; width: auto; }
.pop-ft__logo-text { font-family: var(--page-title-font-family); font-weight: 700; font-size: 2rem; text-transform: uppercase; color: var(--pop-on-p); }
.pop-ft__desc { max-width: 36ch; font-size: .98rem; line-height: 1.55; color: var(--pop-on-p); }
.pop-ft__now { --pop-rot: -4deg; margin: 4px 0 6px 4px; }
.pop-ft__social { display: flex; flex-wrap: wrap; gap: 8px; }
.pop-ft .pop-social { color: var(--pop-on-p); }
.pop-ft .pop-social:hover { background: var(--pop-on-p); color: var(--pop-p); }
/* <p>: o getThemeCSS pinta p:not(.font-preview) com !important (0,1,1). */
.pop-ft p.pop-ft__heading {
    margin: 0 0 16px;
    font-family: var(--page-title-font-family) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pop-on-p) !important;
}
.pop-ft__links { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
body .pop-ft__links li { font-size: 1rem !important; color: var(--pop-on-p) !important; }
.pop-ft__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--pop-on-p);
    font-family: var(--body-font-family);
    font-size: .98rem;
    font-weight: 500;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.pop-ft__link:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pop-ft__link i { width: 18px; text-align: center; flex-shrink: 0; }
.pop-ft__apps { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pop-ft__app {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    border: 2px solid var(--pop-on-p);
    border-radius: 14px;
    background: var(--pop-on-p);
    color: var(--pop-p);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 3px 3px 0 color-mix(in srgb, var(--pop-on-p) 40%, transparent);
}
.pop-ft__app i { font-size: 1.3rem; }
.pop-ft__bottom {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    max-width: var(--pop-wrap);
    margin: clamp(40px, 5vw, 64px) auto 0;
    padding: 18px var(--pop-gutter) 0;
    border-top: 2px dashed color-mix(in srgb, var(--pop-on-p) 50%, transparent);
    font-size: .88rem;
    color: var(--pop-on-p);
}
.pop-ft__soft { color: var(--pop-on-p); }
.pop-ft__dev img { display: block; max-height: 28px; width: auto; }

/* ── Responsivo ────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .pop-live--top .pop-live__show { max-width: 120px; }
}
@media (max-width: 1024px) {
    .pop-nav { display: none; }
    .pop-top__burger { display: inline-grid; }
    .pop-top__bar { justify-content: space-between; }
    .pop-top__logo { margin-right: auto; }
    .pop-ft__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pop-ft__brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    body header.pop-top { padding: 8px 10px 0 !important; }
    .pop-top__bar { min-height: 58px; padding: 6px 6px 6px 14px; gap: 8px; box-shadow: 3px 3px 0 var(--pop-text); }
    .pop-live--top { min-height: 44px; padding: 0 12px; }
    .pop-live--top .pop-live__text { display: none; }
    .pop-top__btn { width: 44px; height: 44px; }
    .pop-top__city { display: none; }
    .pop-ft__inner { grid-template-columns: minmax(0, 1fr); }
    .pop-ft__links--nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
    .pop-ft__mark { font-size: clamp(3.4rem, 24vw, 7rem); }
    .pop-ft__bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .pop-eq i, .pop-ico--spin { animation: none; }
    .pop-sheet__panel, .pop-find__box, .pop-nav--icons .pop-nav__label { transition: none; }
}
