:root {
  /* ===================================================
   * PET SEARCHERS — CORES OFICIAIS DA MARCA (PRODUÇÃO)
   * Extraídas diretamente do logotipo oficial:
   * =================================================== */
  --ps-brand-red: #fa0107;      /* Vermelho vibrante do ícone oficial */
  --ps-brand-black: #000000;    /* Preto oficial do lettering */
  --ps-brand-white: #ffffff;    /* Branco puro de superfície */

  /* ===================================================
   * TOKENS DO DESIGN SYSTEM DIGITAL (ADAPTAÇÃO WCAG AAA/AA)
   * =================================================== */
  --ps-blue: #0052cc;          /* Azul estrutural de alta acessibilidade */
  --ps-blue-hover: #003e99;
  --ps-blue-light: #f0f7ff;    /* Fundo suave para respiro visual */
  --ps-blue-dark: #0a2540;     /* Deep Navy para títulos de alto contraste */
  
  --ps-red: #fa0107;           /* Vermelho oficial como acento de resgate */
  --ps-red-hover: #d60005;
  --ps-red-light: #fef2f2;
  
  --ps-background: #f8fafc;
  --ps-surface: #ffffff;
  --ps-text: #0f172a;
  --ps-text-muted: #64748b;
  --ps-border: #e2e8f0;
  --ps-border-hover: #cbd5e1;
  
  --ps-success: #16a34a;
  --ps-warning: #d97706;
  --ps-danger: #fa0107;
}

/* 
 * STYLES.CSS - Pet Searchers Modern Design System
 * Theme: Compassionate Guardian (Clean, Breathy, Accessible & Modern)
 */

@layer base {
  html {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    scroll-behavior: smooth;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Modal Backdrops & Glassmorphism */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.glass-panel {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Soft Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Pulse animation for active radar pins */
@keyframes pulseMarker {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 36, 33, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 12px rgba(229, 36, 33, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 36, 33, 0); }
}

.pulse-lost-pin {
  animation: pulseMarker 2s infinite;
}

/* Map Legend Controls (3+2 Layout) */
.map-legend-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: #ffffff;
  padding: 0.6rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.map-legend-status-row, .map-legend-actions-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.legend-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.legend-filter-btn:hover {
  background: #f1f5f9;
}

.legend-filter-btn.active {
  background: #002045;
  color: #ffffff;
  border-color: #002045;
}

.map-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  display: inline-block;
}

.map-legend-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 0.75rem;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-legend-action:hover {
  background: #e2e8f0;
}

/* =========================================================
   A4 PRINT STYLESHEET (100% Zero-Page-Break Precision)
   ========================================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 0 !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  header, footer, nav, aside, section, main,
  .no-print, .modal-backdrop, #toastContainer, #btnOpenHelpWizard {
    display: none !important;
  }

  #posterModal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  #posterModalContainer {
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
  }

  #posterArea {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 210mm !important;
    height: 297mm !important;
    max-width: 210mm !important;
    max-height: 297mm !important;
    margin: 0 auto !important;
    padding: 8mm !important;
    box-sizing: border-box !important;
    border: none !important;
    box-shadow: none !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }
}

/* ==========================================================================
   Mobile Navigation Drawer (Vertical Scroll & Accessibility on Small Screens)
   ========================================================================== */
#mobileDrawer > div {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#mobileDrawer > div > div {
  flex-shrink: 0;
}
