/* Big Day Boston Boundary Check - Styled to match bigdayboston.com */
/* Colors from bdb.com theme (Blue Lagoon scheme + named colors) */
:root {
  --color-primary: rgb(251, 77, 65);
  --color-primary-dark: rgb(220, 65, 55);
  --color-inside: #3fa21c;
  --color-outside: #e33f1e;
  --color-unknown: hsl(201, 15%, 44%);
  --color-surface: hsl(201, 15%, 97%);
  --color-text: hsl(201, 15%, 11%);
  --color-text-muted: hsl(201, 15%, 44%);
  --color-gray-90: hsl(201, 15%, 88%);
  --radius: 3px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Lora", Georgia, serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-surface);
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* Header - matches BDB site branding */
.header {
  flex-shrink: 0;
  padding: 1rem 1.25rem 1rem;
  background: var(--color-primary);
  color: white;
  position: relative;
  z-index: 1000;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.header-logo {
  flex-shrink: 0;
  border-radius: 50%;
  background: white;
}

.header h1 {
  margin: 0 0 0.125rem;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
}

.subtitle {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.9;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

.status-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-unknown {
  background: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.95);
}

.status-unknown .status-icon {
  background: rgba(255, 255, 255, 0.7);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-inside {
  background: rgba(255, 255, 255, 0.95);
  color: #2a7a18;
  border-left: 4px solid var(--color-inside);
}

.status-inside .status-icon {
  background: var(--color-inside);
}

.status-outside {
  background: rgba(255, 255, 255, 0.95);
  color: #b83218;
  border-left: 4px solid var(--color-outside);
}

.status-outside .status-icon {
  background: var(--color-outside);
}

.status-error {
  background: rgba(255, 255, 255, 0.95);
  color: #b83218;
  border-left: 4px solid var(--color-outside);
}

.status-error .status-icon {
  background: var(--color-outside);
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Map - fills available space between header and footer */
.main {
  flex: 1;
  flex-shrink: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #232323;
}

/* Leaflet overrides for mobile */
.leaflet-control-zoom {
  border: none !important;
}

.leaflet-control-zoom a {
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  font-size: 20px !important;
}

/* Footer */
.footer {
  flex-shrink: 0;
  padding: 1rem 1.25rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  background: white;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.btn {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  -webkit-appearance: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
  .header {
    padding-top: max(1rem, env(safe-area-inset-top));
  }
}
