/* „Verifică locuința înainte s-o cumperi” (views/utile/verifica-locuinta.ejs, public/js/raport-adresa.js). PDF-ul = @media print, la final. */
.ra-content { padding-bottom: 32px; }
.ra-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ra-small { font-size: .86rem; color: var(--ut-muted); line-height: 1.55; margin: 14px 0 0; max-width: 80ch; }
.ra-from { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--ut-primary-50); color: var(--ut-text); line-height: 1.5; }
.ra-from a { font-weight: 700; color: var(--ut-primary-700); }

/* căutarea și harta */
.ra-search { display: flex; gap: 8px; max-width: 720px; }
.ra-search input { flex: 1; min-width: 0; border: 1px solid #d1d5db; border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 1rem; background: #fff; color: var(--ut-ink); }
.ra-search input:focus { outline: 2px solid var(--ut-primary-100); border-color: var(--ut-primary); }
.ra-search .ut-btn { flex: none; }
@media (max-width: 480px) { .ra-search { flex-direction: column; } .ra-search .ut-btn { justify-content: center; } }
.ra-results { list-style: none; margin: 8px 0 0; padding: 0; max-width: 720px; border: 1px solid var(--ut-line); border-radius: 12px; background: #fff; overflow: hidden; }
.ra-results[hidden] { display: none; }
.ra-results li + li { border-top: 1px solid var(--ut-line-soft); }
.ra-results button { display: flex; gap: 8px; align-items: flex-start; width: 100%; padding: 10px 12px; border: 0; background: none; font: inherit; font-size: .9rem; text-align: left; color: var(--ut-text); cursor: pointer; line-height: 1.4; }
.ra-results button:hover, .ra-results button:focus-visible { background: var(--ut-primary-50); }
.ra-results .ut-icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--ut-primary); }
.ra-hint { margin: 10px 0; font-size: .86rem; color: var(--ut-muted); line-height: 1.5; max-width: 80ch; }
.ra-map { height: 380px; border-radius: 16px; border: 1px solid var(--ut-line); overflow: hidden; background: #e5e7eb; z-index: 0; }
@media (max-width: 640px) { .ra-map { height: 300px; } }
.ra-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; background: #4f46e5; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transform: rotate(-45deg); margin: 2px 0 0; cursor: grab; }
.ra-error { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--ut-warn-bg); border: 1px solid var(--ut-warn-line); color: #78350f; line-height: 1.5; }
.ra-error[hidden] { display: none; }

/* raportul */
.ra-report { margin-top: 8px; padding: 18px 16px; background: #fff; border: 2px solid var(--ut-primary); border-radius: 18px; min-width: 0; scroll-margin-top: 90px; }
.ra-report[hidden] { display: none; }
@media (min-width: 720px) { .ra-report { padding: 22px 24px; } }
.ra-print-head, .ra-print-foot { display: none; }
.ra-top { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-start; justify-content: space-between; }
.ra-top__t { min-width: 0; flex: 1 1 320px; }
.ra-top .ut-h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.ra-meta { margin: 0; font-size: .86rem; color: var(--ut-muted); line-height: 1.5; }
.ra-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ra-copied { margin: 8px 0 0; font-size: .86rem; color: #15803d; font-weight: 700; }
.ra-copied[hidden] { display: none; }
.ra-loading { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; color: var(--ut-muted); line-height: 1.5; }
.ra-loading .ut-icon { flex: none; width: 18px; height: 18px; color: var(--ut-primary); animation: ra-pulse 1.2s ease-in-out infinite; }
@keyframes ra-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ra-loading .ut-icon { animation: none; } }

/* sumarul: câte o linie pe verificare */
.ra-sum { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 760px) { .ra-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ra-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ra-sum a { display: flex; gap: 10px; align-items: center; height: 100%; padding: 10px 12px; border: 1px solid var(--ut-line); border-left-width: 4px; border-radius: 12px; text-decoration: none; color: var(--ut-text); background: #fff; min-width: 0; }
.ra-sum a:hover { border-color: var(--ut-primary); }
.ra-sum__ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--ut-line-soft); color: var(--ut-ink); }
.ra-sum__ic .ut-icon { width: 18px; height: 18px; }
.ra-sum__t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.ra-sum__t strong { font-size: .9rem; color: var(--ut-ink); }
.ra-sum__t span { font-size: .82rem; color: var(--ut-muted); line-height: 1.35; }
.ra-sum__i.is-alert a { border-left-color: #dc2626; } .ra-sum__i.is-alert .ra-sum__ic { background: #fee2e2; color: #b91c1c; }
.ra-sum__i.is-warn a { border-left-color: #d97706; } .ra-sum__i.is-warn .ra-sum__ic { background: #fef3c7; color: #b45309; }
.ra-sum__i.is-info a { border-left-color: #2563eb; } .ra-sum__i.is-info .ra-sum__ic { background: #dbeafe; color: #1d4ed8; }
.ra-sum__i.is-ok a { border-left-color: #16a34a; } .ra-sum__i.is-ok .ra-sum__ic { background: #dcfce7; color: #15803d; }
.ra-sum__i.is-none a, .ra-sum__i.is-wait a { border-left-color: #cbd5e1; }

.ra-badge { flex: none; display: inline-block; padding: 3px 8px; border-radius: 999px; font-style: normal; font-size: .72rem; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.ra-badge--alert { background: #fee2e2; color: #991b1b; }
.ra-badge--warn { background: #fef3c7; color: #92400e; }
.ra-badge--info { background: #dbeafe; color: #1e40af; }
.ra-badge--ok { background: #dcfce7; color: #166534; }
.ra-badge--none, .ra-badge--wait { background: #f1f5f9; color: #475569; }

/* secțiunile */
.ra-sections { display: grid; gap: 12px; margin-top: 18px; }
.ra-sec { border: 1px solid var(--ut-line); border-radius: 14px; padding: 14px; min-width: 0; scroll-margin-top: 90px; }
@media (min-width: 720px) { .ra-sec { padding: 16px 18px; } }
.ra-sec__h { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 1.05rem; font-weight: 800; color: var(--ut-ink); }
.ra-sec__h > span:nth-child(2) { flex: 1; min-width: 0; }
.ra-sec__ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--ut-primary-50); color: var(--ut-primary-700); }
.ra-sec__ic .ut-icon { width: 17px; height: 17px; }
.ra-sec.is-alert { border-color: #fecaca; background: #fffafa; } .ra-sec.is-alert .ra-sec__ic { background: #fee2e2; color: #b91c1c; }
.ra-sec.is-warn { border-color: #fde68a; background: #fffdf5; } .ra-sec.is-warn .ra-sec__ic { background: #fef3c7; color: #b45309; }
.ra-sec.is-ok .ra-sec__ic { background: #dcfce7; color: #15803d; }
.ra-sec__b { color: var(--ut-text); line-height: 1.55; font-size: .93rem; overflow-wrap: anywhere; }
.ra-sec__b p { margin: 6px 0 0; }
.ra-sec__b p:first-child { margin-top: 0; }
.ra-lead { color: var(--ut-ink); font-weight: 650; }
.ra-sub { font-size: .88rem; }
.ra-note { font-size: .8rem; color: var(--ut-muted); }
.ra-counts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .86rem; }
.ra-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ra-list li { display: block; padding: 8px 10px; border-radius: 10px; background: var(--ut-line-soft); }
.ra-list--tight li { padding: 6px 10px; }
.ra-list li strong { color: var(--ut-ink); }
.ra-list li small { display: block; margin-top: 2px; font-size: .8rem; color: var(--ut-muted); line-height: 1.4; }
.ra-list li small b { color: var(--ut-ink); }
.ra-tag { font-style: normal; font-size: .72rem; font-weight: 700; color: #6d28d9; background: #ede9fe; border-radius: 6px; padding: 1px 6px; vertical-align: 1px; }
.ra-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: #94a3b8; }
.ra-dot--alert { background: #dc2626; } .ra-dot--warn { background: #d97706; } .ra-dot--info { background: #2563eb; } .ra-dot--ok { background: #16a34a; }
.ra-cls { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: .74rem; font-weight: 800; color: #fff; background: #6b7280; white-space: nowrap; }
.ra-cls--RsI { background: #dc2626; } .ra-cls--RsII { background: #ea580c; } .ra-cls--RsIII { background: #a16207; } .ra-cls--RsIV { background: #15803d; }
.ra-cls--U1, .ra-cls--U2, .ra-cls--U3 { background: #7c3aed; } .ra-cls--C { background: #2563eb; } .ra-cls--N { background: #6b7280; }
.ra-sec__l { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; }
.ra-more { font-size: .86rem; font-weight: 700; color: var(--ut-primary-700); text-decoration: none; }
.ra-more:hover { text-decoration: underline; }
.ra-sec--next { background: var(--ut-primary-50); border-color: var(--ut-primary-100); }
.ra-disclaimer { margin: 16px 0 0; font-size: .8rem; color: var(--ut-muted); line-height: 1.55; }

/* ce verifică, întrebările, sursele */
.ra-checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 720px) { .ra-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ra-check { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--ut-line); border-radius: 14px; background: #fff; }
.ra-check__i { flex: none; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--ut-primary-50); color: var(--ut-primary-700); }
.ra-check__i .ut-icon { width: 18px; height: 18px; }
.ra-check strong { display: block; color: var(--ut-ink); font-size: .95rem; }
.ra-check span { display: block; font-size: .84rem; color: var(--ut-muted); line-height: 1.45; margin-top: 2px; }
.ra-faq { display: grid; gap: 8px; }
.ra-faq__item { border: 1px solid var(--ut-line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.ra-faq__item summary { cursor: pointer; font-weight: 750; color: var(--ut-ink); }
.ra-faq__item p { margin: 8px 0 0; line-height: 1.6; color: var(--ut-text); }
.ra-sources { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.ra-sources .ut-icon { width: 13px; height: 13px; vertical-align: -1px; }

/* ---------- PDF: doar raportul, pe A4 ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body > :not(main), .ra-noprint, #toast-container, #cookie-banner { display: none !important; }
  body { padding: 0 !important; background: #fff !important; }
  .ut, .ra-content { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .ra-report { border: 0; padding: 0; margin: 0; }
  .ra-print-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; margin-bottom: 10px; border-bottom: 2px solid #111827; font-size: 9pt; color: #374151; }
  .ra-print-head strong { font-size: 11pt; color: #111827; }
  .ra-print-foot { display: block; margin: 10px 0 0; font-size: 8pt; color: #6b7280; overflow-wrap: anywhere; }
  .ra-top .ut-eyebrow { display: none; }
  .ra-top .ut-h2 { font-size: 16pt; }
  .ra-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .ra-sum a { padding: 6px 8px; }
  .ra-sum__ic { width: 26px; height: 26px; }
  .ra-sections { gap: 8px; }
  .ra-sec { padding: 10px 12px; }
  .ra-sec__h { break-after: avoid; page-break-after: avoid; }
  .ra-sec__h, .ra-list li, .ra-sec__b p, .ra-sum__i { break-inside: avoid; page-break-inside: avoid; }
  .ra-sec__b { font-size: 9.5pt; }
  .ra-list li { padding: 4px 8px; }
  .ra-more::after { content: " (anuntat.ro" attr(href) ")"; font-weight: 400; color: #6b7280; font-size: 8pt; }
  .ra-sec--next { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
