/* print.css — folha de impressão do site inteiro (A03, A55).
   Ligada em TODAS as páginas servidas, no fim do <head>:
     <link rel="stylesheet" href="/css/print.css" media="print">
   Princípios: só conteúdo no papel (sem menu, botões, banner de cookies, newsletter, formulários, filtros);
   cores de fundo preservadas onde dão sentido (barras e gráficos), blocos escuros grandes clareados;
   tabelas inteiras e legíveis; FAQ aberto; sem cortes de cards/linhas e sem título órfão. */

@page { margin: 14mm 12mm 16mm; }

html, body { background: #fff !important; }
html { padding-left: 0 !important; scroll-padding: 0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin-left: 0 !important; padding-left: 0 !important; padding-bottom: 0 !important; color: #111; font-size: 11pt; }

/* ---- UI de tela: fora do papel ---- */
.sidebar, #sidebar, .overlay, .menu-btn, .menu-close, .hamburger, .glm-burger, .skip-link,
.gl-ck, #gl-ck, body > div:has(> #gl-ck-ok),
.ticker, .ticker-wrap, .ct-ticker-wrap, .lang-dropdown, .masthead-lang, .lang-btn, .glm-top-lang, .glm-top-right, .doc-lang,
.home-nl-strip, .ph-nl, .cta-strip, #pc-mount, .partner-card, .city-toc, .util-bar,
form, input, select, textarea, button:not(.faq-q), .filter, .filter-btn, .chips, .obs-tabs-bar,
.emergency-dialog, dialog:not([open]), .leaflet-control-container, .leaflet-control,
video, iframe, audio, .gyg-btn, .aiuto-btn, .info-popover-btn, .rank-info-btn,
.dae-location-btn, .farmacia-tipo-btn, .thr-btns, .thr-route-btn, .thr-day-btn, .trtab-bar, .train-station-btns,
.tc-cta, .tc-notify-form, .live-cta, .nearby-cta, .sw-cta, .ec-cta, .city-card-cta,
.city-footer-partner, .back-to-top, .gl-nav, .gl-lang, .footer-time, [data-print="hide"] { display: none !important; }

/* ---- layout: sem a coluna do menu, cabeçalhos no fluxo ---- */
.main-content, .city-main, main { margin-left: 0 !important; padding-left: 0 !important; }
header.masthead, .ticker { margin-left: 0 !important; }
header, .masthead, .glm-top, .gl-top, .atl-top, .obs-masthead, .obs-tabs, [class*="sticky"] {
  position: static !important; top: auto !important; box-shadow: none !important;
}
.masthead-date { display: block !important; }

/* ---- blocos escuros grandes: clareados (economia de tinta e legibilidade sem "gráficos de fundo") ---- */
footer, .footer, .city-footer, .site-footer, .masthead, .glm-top, .gl-top, .obs-masthead, .obs-kpi-strip {
  background: #fff !important; color: #111 !important; border-top: 1px solid #bbb;
}
footer *, .footer *, .city-footer *, .masthead *, .glm-top *, .gl-top *, .obs-masthead *, .obs-kpi-strip * {
  background-color: transparent !important; color: #222 !important; box-shadow: none !important;
}
.masthead { border-top: 0; border-bottom: 1px solid #bbb; }
footer { padding: 14px 0 !important; margin-top: 12px; }
footer .footer-grid { gap: 12px !important; }

/* ---- tipografia e links ---- */
a { color: #111 !important; text-decoration: underline; }
main p a[href^="http"]::after, main li a[href^="http"]::after,
article p a[href^="http"]::after, article li a[href^="http"]::after {
  content: " (" attr(href) ")"; font-size: 8.5pt; color: #555 !important; word-break: break-all;
}
main p a[href^="/"]::after, main li a[href^="/"]::after,
article p a[href^="/"]::after, article li a[href^="/"]::after {
  content: " (ilgarda.live" attr(href) ")"; font-size: 8.5pt; color: #555 !important; word-break: break-all;
}
h1, h2, h3, h4, h5, h6, .section-label, .section-title, .section-eyebrow { break-after: avoid; page-break-after: avoid; }
.section-eyebrow + .section-title, .section-eyebrow + h2 { break-before: avoid; page-break-before: avoid; }
p, li, blockquote { orphans: 3; widows: 3; }

/* ---- tabelas inteiras e legíveis ---- */
[class*="table-wrap"], [class*="table-scroll"], .ed-table-wrap, .obs-table-wrap, [class*="scroll-x"] {
  overflow: visible !important; max-height: none !important;
}
table { width: 100% !important; min-width: 0 !important; border-collapse: collapse !important; font-size: 9.5pt; }
thead { display: table-header-group; }
tr, td, th { break-inside: avoid; page-break-inside: avoid; }
th, td { color: #111 !important; border-bottom: 1px solid #ccc; padding: 4px 6px !important; white-space: normal !important; }
th { background: #f2f2f2 !important; }

/* ---- cards, linhas e figuras não se partem ---- */
img, svg, figure, canvas, blockquote, pre,
[class*="-card"], [class*="card-"], .card, .faq-item, .ev-item, .event-item, .farmacia, .farmacia-item,
.stat, [class*="-stat"], .gs-row, [class*="-row"]:not(main):not(section),
.gs-widget, .live-widget, .sidebar-widget { break-inside: avoid; page-break-inside: avoid; }
/* grades com fundo de "fio" (gap:1px sobre background): sem fundo no papel, borda em cada card */
.nearby-grid { background: none !important; }
.nearby-card { border: 1px solid #ddd; }
img { max-width: 100% !important; height: auto; }

/* ---- FAQ e <details>: conteúdo aberto (o cookie.js também abre os <details> em beforeprint) ---- */
details > *:not(summary) { display: block !important; }
details::details-content { content-visibility: visible !important; display: block !important; }
.faq-a { display: block !important; max-height: none !important; opacity: 1 !important; }
.faq-icon { display: none !important; }

/* ---- mapas: sem controles; altura contida ---- */
.leaflet-container { break-inside: avoid; max-height: 120mm; }
