/* Asystent Projektanta — custom styles */

/* Smooth anchor scroll offset for sticky nav */
html {
  scroll-padding-top: 80px;
}

/* Focus ring — brand color */
:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

/* Scrollbar — subtle */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Alpine cloak */
[x-cloak] { display: none !important; }

/* Report markdown output */
.report-body h2 { font-size: 1.125rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.5rem; color: #0f172a; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.25rem; }
.report-body h3 { font-size: 1rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.25rem; color: #1e293b; }
.report-body p  { margin-bottom: 0.75rem; line-height: 1.7; color: #334155; }
.report-body ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 0.75rem; }
.report-body li { margin-bottom: 0.25rem; color: #334155; }
.report-body table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: 0.875rem; }
.report-body th { background: #f1f5f9; font-weight: 600; padding: 0.5rem 0.75rem; text-align: left; border: 1px solid #e2e8f0; }
.report-body td { padding: 0.5rem 0.75rem; border: 1px solid #e2e8f0; vertical-align: top; }
.report-body strong { font-weight: 700; color: #0f172a; }

/* Traffic light emoji styling (sekcja 0 raportu) */
.tl-red    { display: inline-flex; align-items: center; background: #fee2e2; color: #dc2626; padding: 0.125rem 0.5rem; border-radius: 0.375rem; font-weight: 700; }
.tl-yellow { display: inline-flex; align-items: center; background: #fef3c7; color: #b45309; padding: 0.125rem 0.5rem; border-radius: 0.375rem; font-weight: 700; }
.tl-green  { display: inline-flex; align-items: center; background: #d1fae5; color: #059669; padding: 0.125rem 0.5rem; border-radius: 0.375rem; font-weight: 700; }

/* Status banners (sekcja 1 raportu) */
.status-banner-red {
  display: block;
  background: #fee2e2;
  border: 2px solid #dc2626;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #991b1b;
  margin: 1.25rem 0;
}
.status-banner-green {
  display: block;
  background: #d1fae5;
  border: 2px solid #10b981;
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #065f46;
  margin: 1.25rem 0;
}

/* Finding cards — Wielka Czwórka */
.finding-card {
  border-radius: 0.5rem;
  padding: 0.875rem 1rem 0.875rem 1.125rem;
  margin-bottom: 1.25rem;
}
.finding-card h3 { margin-top: 0; }
.finding-blokujace { border-left: 4px solid #dc2626; background: #fff5f5; }
.finding-wezwanie  { border-left: 4px solid #f59e0b; background: #fffbeb; }
.finding-kosmetyczne { border-left: 4px solid #94a3b8; background: #f8fafc; }

/* Master Checklist */
.master-checklist { width: 100%; }
.print-area { }

/* Print — widoczna TYLKO Master Checklist */
@media print {
  body > * { visibility: hidden; }
  /* Domyślnie (checklist-only) */
  .print-area { visibility: visible; position: fixed; top: 0; left: 0; right: 0; padding: 1.5rem; }
  .print-area * { visibility: visible; }
  /* Pełny raport PDF — aktywowany przez klasę na body */
  body.print-full-report > * { visibility: hidden; }
  body.print-full-report .report-print-wrapper { visibility: visible; position: fixed; top: 0; left: 0; right: 0; bottom: 0; overflow: auto; background: white; padding: 2rem; }
  body.print-full-report .report-print-wrapper * { visibility: visible; }
}

/* Diff report — sekcja 2 "Status poprawek" */
.diff-status-section {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}
.diff-status-section > h2 {
  border-bottom: none;
  margin-top: 0;
  color: #0f172a;
}
.diff-naprawione {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.diff-naprawione h3 { color: #065f46; margin-top: 0; }
.diff-pozostale {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.diff-pozostale h3 { color: #92400e; margin-top: 0; }
.diff-nowe {
  border-left: 4px solid #ef4444;
  background: #fff5f5;
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}
.diff-nowe h3 { color: #991b1b; margin-top: 0; }

/* Legal pages (regulamin, polityka prywatności) */
.legal-body section + section { margin-top: 2rem; }
.legal-body h2 { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-top: 2.5rem; margin-bottom: 1rem; letter-spacing: -0.01em; scroll-margin-top: 6rem; }
.legal-body p { line-height: 1.7; color: #334155; margin-bottom: 1rem; }
.legal-body ul { list-style: disc; padding-left: 1.5rem; margin: 1rem 0; }
.legal-body li { line-height: 1.7; color: #334155; margin-bottom: 0.5rem; }
.legal-body strong { color: #0f172a; font-weight: 600; }
.legal-body a { color: #059669; text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }
.legal-body code { background: #f1f5f9; color: #0f172a; padding: 0.1rem 0.4rem; border-radius: 0.25rem; font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Typewriter cursor (hero headline) */
.tw-cursor { display: inline-block; width: 2px; height: 0.9em; background: #34d399; margin-left: 2px; vertical-align: -0.05em; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Fade-up on scroll */
.fu { opacity: 0; transform: translateY(28px); transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.fu.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .fu { opacity: 1; transform: none; transition: none; }
  .tw-cursor { animation: none; }
}

/* Marquee (wstążka biur projektowych) */
.marquee-wrap { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 28s linear infinite; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.firm-logo { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; color: #94a3b8; white-space: nowrap; letter-spacing: 0.02em; }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* SSE progress animation */
@keyframes pulse-bar {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.pulse-bar { animation: pulse-bar 1.4s ease-in-out infinite; }
