/* SpotLocal · botões de relatório/compartilhar, faixa de análise compartilhada e relatório para impressão (A4) */

/* ---- tela: ações no veredito ---- */
.verdict .v-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--vline); }
.verdict .v-share .btn { background: #fff; min-height: 40px; font-size: 13px; gap: 7px; }
.verdict .v-share .btn .ico { width: 17px; height: 17px; }
.verdict .v-share .vs-s { display: none; }
@media (max-width: 600px) {
  .verdict .v-share { gap: 7px; }
  .verdict .v-share .btn { flex: 1 1 130px; justify-content: center; padding-left: 10px; padding-right: 10px; font-size: 13px; white-space: nowrap; }
  .verdict .v-share .vs-l { display: none; }
  .verdict .v-share .vs-s { display: inline; }
}

/* ---- faixa: análise aberta por link ---- */
.shared-banner { display: flex; align-items: center; gap: 12px; background: #fff6e3; border: 1px solid #f6dfae; border-radius: 16px; padding: 12px 14px; margin: 0 0 18px; color: var(--ink); }
.shared-banner > .ico { width: 20px; height: 20px; flex: none; color: var(--warn); }
.shared-banner p { margin: 0; flex: 1; font-size: 13.5px; line-height: 1.45; }
.shared-banner .btn { flex: none; white-space: nowrap; }
@media (max-width: 600px) {
  .shared-banner { flex-wrap: wrap; align-items: flex-start; }
  .shared-banner p { flex: 1 1 200px; font-size: 13px; }
  .shared-banner .btn { width: 100%; justify-content: center; min-height: 40px; }
}

/* ---- diálogo de compartilhar ---- */
.share-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.share-row { display: flex; gap: 8px; align-items: stretch; }
.share-row input { flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-overflow: ellipsis; }
.share-row .btn { flex: none; white-space: nowrap; }
.share-row .btn .ico, .share-wa .ico { width: 17px; height: 17px; }
.share-wa { margin-top: 10px; justify-content: center; gap: 8px; }
.share-ok { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: var(--good); font-weight: 600; }
@media (max-width: 600px) {
  .share-row { flex-direction: column; }
  .share-row .btn { justify-content: center; min-height: 43px; }
}

/* ---- relatório: só existe na impressão ---- */
.print-report { display: none; }

/* imprimir uma tela que não é o relatório de um ponto liberado: só um aviso */
@media print {
  body:not(.printing-report) > * { display: none !important; }
  body:not(.printing-report)::after { content: "Para imprimir, abra a análise completa de um ponto no SpotLocal e use “Baixar relatório (PDF)”."; display: block; padding: 40mm 20mm; font: 600 16px/1.5 system-ui, sans-serif; color: #242039; text-align: center; }
}
@media print {
  @page { size: A4; margin: 12mm 13mm 13mm; }
  html, body { background: #fff !important; }
  /* impressão fora do relatório: sem navegação, mapas, 3D e botões */
  .sidebar, .topbar, .bottom-nav, .app-foot, .skip, .toast, .loading, dialog, button, .btn, canvas, .map-canvas, .world-panel, #streetWorld, .result-tabs, .shared-banner { display: none !important; }
  .workspace { margin: 0 !important; padding: 0 !important; }

  body.printing-report > *:not(#printReport) { display: none !important; }
  body.printing-report #printReport { display: block !important; }

  .rp { font-family: var(--font); color: #242039; font-size: 11.5px; line-height: 1.42; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp * { box-sizing: border-box; }
  .rp h1, .rp h2, .rp h3 { margin: 0; letter-spacing: -0.01em; }
  .rp b { font-weight: 700; }
  .rp .pos { color: #177354; }
  .rp .neg { color: #b3383f; }

  .rp-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 9px; border-bottom: 2px solid #5746c8; margin-bottom: 12px; }
  .rp-head img { width: 150px; height: auto; display: block; }
  .rp-head div { text-align: right; }
  .rp-head b { display: block; font-size: 14px; color: #5746c8; }
  .rp-head span { font-size: 10.5px; color: #716d80; }

  .rp-addr { margin-bottom: 10px; }
  .rp-kicker { margin: 0 0 2px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #5746c8; }
  .rp-addr h1 { font-size: 22px; line-height: 1.15; }
  .rp-addr p { margin: 3px 0 0; color: #4a4560; font-size: 12px; }
  .rp-addr small { font-size: 10.5px; color: #716d80; }

  .rp-verdict { --vc: #5746c8; --vbg: #eeebfa; border: 1px solid #ddd6f5; border-left: 5px solid var(--vc); background: var(--vbg); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; break-inside: avoid; }
  .rp-verdict.rp-ok { --vc: #177354; --vbg: #eaf6ef; border-color: #cbe8d8; border-left-color: var(--vc); }
  .rp-verdict.rp-mid { --vc: #b07508; --vbg: #fff6e3; border-color: #f6dfae; border-left-color: var(--vc); }
  .rp-verdict.rp-bad { --vc: #c2414a; --vbg: #fff0f1; border-color: #f5cfd3; border-left-color: var(--vc); }
  .rp-verdict.rp-off { --vc: #8b8fa3; --vbg: #f3f2f7; border-color: #e2e0ea; border-left-color: var(--vc); }
  .rp-vtop { display: flex; gap: 8px; align-items: center; }
  .rp-status, .rp-conf { font-size: 10.5px; font-weight: 700; background: #fff; border-radius: 6px; padding: 2px 8px; }
  .rp-status { color: var(--vc); }
  .rp-conf { color: #716d80; border: 1px solid #e9e6f0; }
  .rp-verdict h2 { font-size: 16px; margin: 6px 0 3px; }
  .rp-verdict p { margin: 0; font-size: 12px; }
  .rp-verdict p b { color: var(--vc); }
  .rp-verdict .rp-teto { margin-top: 5px; font-size: 10.5px; color: #4a4560; }

  .rp-kpis { display: grid; gap: 8px; margin-bottom: 10px; break-inside: avoid; }
  .rp-kpis3 { grid-template-columns: repeat(3, 1fr); }
  .rp-kpis4 { grid-template-columns: repeat(4, 1fr); margin: 8px 0; }
  .rp-kpis > div { border: 1px solid #e9e6f0; border-radius: 9px; padding: 8px 10px; background: #fbfaff; }
  .rp-kpis span { display: block; font-size: 10px; color: #716d80; font-weight: 600; }
  .rp-kpis b { display: block; font-size: 19px; line-height: 1.2; margin: 2px 0 1px; }
  .rp-kpis4 b { font-size: 15px; }
  .rp-kpis small { display: block; font-size: 9.5px; color: #716d80; line-height: 1.3; }

  .rp-sec { margin-bottom: 11px; break-inside: avoid; }
  .rp-sec h3 { font-size: 13px; color: #40349b; margin-bottom: 5px; padding-bottom: 3px; border-bottom: 1px solid #e9e6f0; }
  .rp-sec .rp-h3b { margin-top: 10px; }
  .rp-sub { margin: 5px 0 0; font-size: 10.5px; color: #625a7b; }
  .rp-proj { break-inside: auto; }
  .rp-keep { break-inside: avoid; }

  .rp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .rp-cols > .rp-sec { min-width: 0; }

  .rp-table { width: 100%; border-collapse: collapse; font-size: 11px; }
  .rp-table th { text-align: left; font-size: 10px; color: #716d80; font-weight: 600; padding: 3px 6px; border-bottom: 1px solid #ddd6f5; }
  .rp-table td { padding: 3.5px 6px; border-bottom: 1px solid #f0edf6; vertical-align: top; }
  .rp-table tr { break-inside: avoid; }
  .rp-table thead { display: table-header-group; }
  .rp-num th:not(:first-child), .rp-num td:not(:first-child) { text-align: right; white-space: nowrap; }
  .rp-table tr.hl td { background: #f3f0fc; font-weight: 700; }
  .rp-kv td:first-child { color: #4a4560; padding-left: 0; }
  .rp-kv td:last-child { text-align: right; font-weight: 600; padding-right: 0; }
  .rp-kv tr.sum td { font-weight: 700; color: #242039; }
  .rp-kv tr.tot td { border-top: 1.5px solid #242039; border-bottom: 0; font-weight: 700; color: #242039; padding-top: 5px; }
  .rp-eq { margin-top: 8px; background: #fbfaff; }
  .rp-eq td:first-child { padding-left: 6px; }
  .rp-eq td:last-child { padding-right: 6px; }

  .rp-chart { display: block; width: 100%; height: auto; margin: 6px 0 2px; overflow: visible; }
  .rp-chart text { font-size: 8.5px; fill: #716d80; font-family: var(--font); }
  .rp-chart text.eq { fill: #c2414a; font-weight: 700; }
  .rp-leg { margin: 0 0 6px; font-size: 9.5px; color: #716d80; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
  .rp-leg span { display: inline-flex; align-items: center; gap: 4px; }
  .rp-leg i { display: inline-block; width: 10px; height: 8px; border-radius: 2px; }
  .rp-leg i.eq { height: 0; border-top: 1.5px dashed #c2414a; border-radius: 0; width: 14px; }

  .rp-list { margin: 0; padding-left: 16px; font-size: 10.5px; }
  .rp-list li { margin-bottom: 4px; }

  .rp-foot { margin-top: 12px; padding-top: 8px; border-top: 1px solid #ddd6f5; font-size: 10px; color: #625a7b; break-inside: avoid; }
  .rp-foot b { color: #242039; }
}
