/*
Theme Name: PetsGo WebApp Theme
Theme URI: https://petsgo.it
Author: PetsGo Tech Lead
Description: Tema Premium Custom (SPA) per la piattaforma PetsGo.
Version: 1.0.0
Text Domain: petsgo
*/

/* ==========================================================================
   DESIGN SYSTEM & VARIABLES (PREMIUM AESTHETICS)
   ========================================================================== */
:root {
  /* Color Palette - Vibrant & Premium */
  --color-primary: #FF6B6B; /* Vibrant Coral */
  --color-primary-dark: #E55A5A;
  --color-secondary: #4ECDC4; /* Aqua Mint */
  --color-accent: #FFE66D; /* Sunny Yellow */
  
  /* Emergency Colors */
  --color-emergency: #FF3B30;
  --color-emergency-glow: rgba(255, 59, 48, 0.4);

  /* Backgrounds & Surfaces (Glassmorphism support) */
  --bg-body: #F7F9FC;
  --bg-surface: #FFFFFF;
  --bg-surface-glass: rgba(255, 255, 255, 0.85);
  
  /* Typography */
  --text-main: #2D3436;
  --text-muted: #636E72;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadows & Layout */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 32px rgba(0,0,0,0.12);
  --border-radius: 16px;
  --border-radius-pill: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #121212;
    --bg-surface: #1E1E1E;
    --bg-surface-glass: rgba(30, 30, 30, 0.85);
    --text-main: #F5F6FA;
    --text-muted: #A4B0BE;
  }
}

/* ==========================================================================
   RESET & TYPOGRAPHY
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   UTILITY CLASSES (DRY)
   ========================================================================== */
.glass-panel {
  background: var(--bg-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-sos {
  background-color: var(--color-emergency);
  color: white;
  box-shadow: 0 0 0 0 var(--color-emergency-glow);
  animation: pulse-emergency 2s infinite;
}

@keyframes pulse-emergency {
  0% { box-shadow: 0 0 0 0 var(--color-emergency-glow); }
  70% { box-shadow: 0 0 0 15px rgba(255, 59, 48, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}

/* ==========================================================================
   LAYOUT: SINGLE PAGE APP
   ========================================================================== */
#app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

#map-container {
  flex-grow: 1;
  width: 100%;
  background-color: #e0e0e0; /* Placeholder until map loads */
  position: relative;
}

/* OVERLAYS */
.overlay-top {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  padding: 8px 16px;
  background: var(--bg-surface);
  border-radius: var(--border-radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.filter-chip.active {
  background: var(--color-secondary);
  color: #fff;
}

/* BOTTOM APP BAR (Mobile First) */
.bottom-bar {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  border-top-left-radius: var(--border-radius);
  border-top-right-radius: var(--border-radius);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
}

.nav-item.active {
  color: var(--color-primary);
}

/* SOS Floating Action Button */
.fab-sos {
  position: absolute;
  bottom: 35px; /* Sporge dalla bottom bar */
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  z-index: 101;
}
