/* Carbon MRV Platform - custom styles on top of Tailwind */

/* Smooth scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Map container */
.map-container { height: 480px; width: 100%; border-radius: 0.5rem; overflow: hidden; }
.map-container.tall { height: 640px; }

/* Leaflet attribution restyle */
.leaflet-container { font-family: inherit; }

/* Table styles */
.cmrv-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.cmrv-table thead th {
  text-align: left;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cmrv-table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.cmrv-table tbody tr:hover { background: #f8fafc; }
.cmrv-table tbody tr:last-child td { border-bottom: none; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1rem; height: 1rem;
  border: 2px solid #e2e8f0;
  border-top-color: #15803d;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Markdown rendered output (for AI doc previews) */
.prose-mrv h1 { font-size: 1.5rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.75rem; color: #0f172a; }
.prose-mrv h2 { font-size: 1.25rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; color: #0f172a; }
.prose-mrv h3 { font-size: 1.1rem;  font-weight: 600; margin-top: 1rem; margin-bottom: 0.5rem; color: #1e293b; }
.prose-mrv p  { margin-bottom: 0.75rem; line-height: 1.65; color: #334155; }
.prose-mrv ul { list-style: disc; margin-left: 1.25rem; margin-bottom: 0.75rem; }
.prose-mrv ol { list-style: decimal; margin-left: 1.25rem; margin-bottom: 0.75rem; }
.prose-mrv li { margin-bottom: 0.25rem; }
.prose-mrv code {
  background: #f1f5f9;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}
.prose-mrv blockquote {
  border-left: 3px solid #15803d;
  padding-left: 0.875rem;
  color: #475569;
  font-style: italic;
}

/* Toast */
.cmrv-toast {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  background: #0f172a; color: #fff;
  padding: 0.75rem 1rem; border-radius: 0.5rem;
  box-shadow: 0 10px 25px -10px rgba(0,0,0,0.4);
  font-size: 0.875rem;
  z-index: 100;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.cmrv-toast.show { opacity: 1; transform: translateY(0); }
.cmrv-toast.success { background: #15803d; }
.cmrv-toast.error { background: #b91c1c; }

/* Compact stat tile */
.stat-tile { background:#fff; border:1px solid #e2e8f0; padding:1rem; border-radius:0.5rem; }

/* PWA install hint */
@media (display-mode: standalone) {
  .pwa-only { display: block; }
}
