/* ==========================================================================
   Nathejk Photo Request App — Mobile First Stylesheet + Map Styling
   Domain: nathejk.mklabs.dk
   ========================================================================== */

:root {
  --bg-app: #090d12;
  --bg-surface: #121820;
  --bg-surface-elevated: #1a222d;
  --bg-surface-card: #151c26;
  --bg-surface-active: #222d3d;
  
  --border-subtle: #232d3b;
  --border-strong: #334155;
  --border-focus: #f97316;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-inverse: #090d12;

  --nathejk-orange: #ff6b00;
  --nathejk-amber: #f59e0b;
  --nathejk-yellow: #fbbf24;
  
  --status-open: #f59e0b;
  --status-open-bg: rgba(245, 158, 11, 0.12);
  --status-claimed: #38bdf8;
  --status-claimed-bg: rgba(56, 189, 248, 0.12);
  --status-completed: #22c55e;
  --status-completed-bg: rgba(34, 197, 94, 0.12);
  --status-urgent: #ef4444;
  --status-urgent-bg: rgba(239, 68, 68, 0.15);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow-orange: 0 0 16px rgba(255, 107, 0, 0.3);
  --shadow-glow-red: 0 0 14px rgba(239, 68, 68, 0.4);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Base resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 600px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
  position: relative;
  padding-bottom: calc(85px + var(--safe-bottom));
}

/* ==========================================================================
   Header & Brand
   ========================================================================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: rgba(18, 24, 32, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 16px 8px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nathejk-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.brand-subtext {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.domain-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:active {
  transform: scale(0.92);
  background-color: var(--bg-surface-active);
  color: var(--text-main);
}

/* Install App Banner (PWA) */
.install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 0;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.14), rgba(255, 107, 0, 0.05));
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-radius: var(--radius-md);
}

.install-banner-icon img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: block;
}

.install-banner-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.install-banner-text strong {
  font-size: 0.85rem;
  color: var(--text-main);
}

.install-banner-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.install-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-install {
  background: linear-gradient(135deg, #ff6b00 0%, #ea580c 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-install:active {
  transform: scale(0.95);
}

.btn-install-guide {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-install-dismiss {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

/* Install Guide Modal */
.guide-platform {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.guide-platform-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--nathejk-yellow);
  margin-bottom: 8px;
}

.guide-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-steps li {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.guide-steps li strong {
  color: var(--text-main);
}

/* View switcher pills */
.view-switch-bar {
  display: flex;
  gap: 8px;
  padding: 8px 16px 0;
}

.view-pill {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.view-pill.active {
  background: var(--bg-surface-active);
  border-color: var(--nathejk-orange);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Photographer Quick Bar */
.photographer-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 6px 12px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.photographer-info {
  display: flex;
  align-items: center;
  gap: 6px;
}

.photographer-info .label {
  color: var(--text-dim);
}

.photographer-info .name {
  color: var(--nathejk-yellow);
  font-weight: 600;
}

.text-btn {
  background: none;
  border: none;
  color: var(--status-claimed);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
}

/* ==========================================================================
   Stats Strip
   ========================================================================== */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 16px 4px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.stat-card:active {
  transform: scale(0.96);
  border-color: var(--border-strong);
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.text-orange { color: var(--nathejk-amber); }
.text-red { color: var(--status-urgent); }
.text-blue { color: var(--status-claimed); }
.text-green { color: var(--status-completed); }

/* ==========================================================================
   Controls: Search & Filter Tabs
   ========================================================================== */
.controls-section {
  padding: 8px 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 36px 10px 38px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--nathejk-orange);
  box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.2);
}

.clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Filter pills horizontal scroll */
.filter-pills-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-pills-container::-webkit-scrollbar {
  display: none;
}

.pill {
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pill.active {
  background: var(--bg-surface-active);
  border-color: var(--nathejk-orange);
  color: var(--nathejk-yellow);
  font-weight: 600;
}

.pill.pill-mine {
  border-color: rgba(255, 107, 0, 0.4);
  color: var(--nathejk-orange);
}

/* Status tabs */
.status-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 2px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Map View Styling
   ========================================================================== */
/* Dark-mode filter applied only to the tile layer so markers/popups stay colored */
.leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.9) saturate(0.8);
}

.map-view-container {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.map-info-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.map-mini-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.map-mini-btn:active {
  background-color: var(--bg-surface-active);
}

.map-toggle-on {
  border-color: rgba(124, 58, 237, 0.6);
  color: #c4b5fd;
  background: rgba(124, 58, 237, 0.15);
}

.map-toggle-off {
  opacity: 0.6;
}

.map-frame {
  height: 52vh;
  min-height: 320px;
  max-height: 480px;
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  z-index: 10;
}

.map-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-urgent { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.dot-open { background: #f59e0b; }
.dot-claimed { background: #38bdf8; }
.dot-completed { background: #22c55e; }

/* Custom Leaflet Map Pin Badges */
.leaflet-div-icon {
  background: transparent;
  border: none;
}

.custom-map-pin {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.custom-map-pin:active {
  transform: scale(1.15);
}

.pin-urgent {
  background: #ef4444;
  animation: pulse-pin 1.8s infinite;
}

.pin-open {
  background: #f59e0b;
}

.pin-claimed {
  background: #0284c7;
}

.pin-completed {
  background: #16a34a;
}

@keyframes pulse-pin {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Live photographer GPS check-in markers */
.photographer-pin {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: #7c3aed;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.6);
}

.photographer-pin-me {
  background: #ff6b00;
  box-shadow: 0 0 0 3px rgba(255,107,0,0.35), 0 3px 8px rgba(0,0,0,0.6);
  animation: pulse-photographer 2s infinite;
}

@keyframes pulse-photographer {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,0,0.5), 0 3px 8px rgba(0,0,0,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(255,107,0,0), 0 3px 8px rgba(0,0,0,0.6); }
}

.dot-photographer { background: #7c3aed; }

/* Map Popups (Dark Theme) */
.leaflet-popup-content-wrapper {
  background: var(--bg-surface-elevated) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-elevated) !important;
  padding: 4px !important;
}

.leaflet-popup-tip {
  background: var(--bg-surface-elevated) !important;
}

.map-popup-card {
  padding: 4px;
  font-family: var(--font-sans);
}

.map-popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.map-popup-location {
  font-size: 0.8rem;
  color: var(--nathejk-amber);
  margin-bottom: 6px;
}

.map-popup-photographers {
  font-size: 0.75rem;
  color: var(--status-claimed);
  margin-bottom: 8px;
}

.map-popup-btn {
  background: var(--nathejk-orange);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
}

/* ==========================================================================
   Feed & Request Cards
   ========================================================================== */
.feed-section {
  padding: 10px 16px;
  flex: 1;
}

.sync-banner {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 8px;
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color 0.2s ease, transform 0.15s ease;
  cursor: pointer;
}

.request-card:active {
  transform: scale(0.985);
}

.request-card.urgent-card {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-surface-card) 40%);
  box-shadow: var(--shadow-glow-red);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.prio-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prio-urgent {
  background: var(--status-urgent-bg);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulse-urgent 2s infinite;
}

@keyframes pulse-urgent {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.prio-normal {
  display: none; /* Hide default priority for minimal clutter */
}

.prio-low {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dim);
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge.status-open {
  background: var(--status-open-bg);
  color: var(--status-open);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.status-claimed {
  background: var(--status-claimed-bg);
  color: var(--status-claimed);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-badge.status-completed {
  background: var(--status-completed-bg);
  color: var(--status-completed);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.card-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--nathejk-amber);
}

.has-map-indicator {
  font-size: 0.72rem;
  background: rgba(56, 189, 248, 0.12);
  color: var(--status-claimed);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.card-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Photographers pill badges on card */
.card-photographers-box {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0 2px;
}

.photographer-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.photographer-pill.is-me {
  background: rgba(255, 107, 0, 0.15);
  color: var(--nathejk-orange);
  border-color: rgba(255, 107, 0, 0.35);
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-top: 2px;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.card-action-bar {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-card-action {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-claim {
  background: linear-gradient(135deg, #ff6b00 0%, #ea580c 100%);
  color: #fff;
  box-shadow: var(--shadow-glow-orange);
}

.btn-claim:active {
  transform: scale(0.97);
  filter: brightness(0.9);
}

.btn-join {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
}

.btn-complete {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
}

/* Skeleton Loading */
.skeleton-card {
  height: 140px;
  background: linear-gradient(90deg, #151c26 25%, #1f2937 50%, #151c26 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 4px;
}

.empty-state h3 {
  font-size: 1.1rem;
  color: var(--text-main);
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* ==========================================================================
   Floating Action Button (FAB)
   ========================================================================== */
.fab-wrapper {
  position: fixed;
  bottom: calc(20px + var(--safe-bottom));
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
}

.fab-btn {
  pointer-events: auto;
  background: linear-gradient(135deg, #ff6b00 0%, #f97316 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fab-btn:active {
  transform: scale(0.94);
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}

/* ==========================================================================
   Modals & Drawers
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-sheet {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 12px 20px calc(24px + var(--safe-bottom));
  box-shadow: var(--shadow-elevated);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-sheet-sm {
  max-height: 60vh;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 0 auto 12px;
}

.header-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-title-row h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.close-btn {
  background: var(--bg-surface-elevated);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-body {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.flex-1 { flex: 1; }

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.required {
  color: var(--status-urgent);
}

.optional-pill {
  font-size: 0.65rem;
  font-weight: 500;
  background: var(--bg-surface-elevated);
  color: var(--text-dim);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

/* GPS share toggle in photographer settings */
.gps-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
}

.gps-share-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gps-share-text strong {
  font-size: 0.9rem;
  color: var(--text-main);
}

.gps-share-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.gps-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-active);
  border: 1px solid var(--border-strong);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.gps-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform 0.2s ease, background 0.2s ease;
}

.gps-switch:checked {
  background: var(--nathejk-orange);
  border-color: var(--nathejk-orange);
}

.gps-switch:checked::after {
  transform: translateX(20px);
  background: #fff;
}

.gps-status-text {
  font-size: 0.76rem;
  color: var(--text-dim);
  text-align: center;
  min-height: 16px;
}

input[type="text"], input[type="tel"], input[type="number"], select, textarea {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  outline: none;
  width: 100%;
}

input[type="text"]:focus, input[type="tel"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  border-color: var(--nathejk-orange);
}

textarea {
  resize: vertical;
}

/* Location Picker Styling */
.location-picker-box {
  background: var(--bg-app);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.picker-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-picker-toggle {
  background: none;
  border: none;
  color: var(--status-claimed);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.picker-map-container {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.picker-hint {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.picker-actions-row {
  display: flex;
  gap: 6px;
}

.btn-danger-text {
  color: #f87171 !important;
}

.picker-map-frame {
  height: 180px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.coords-display {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--nathejk-amber);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, #ff6b00 0%, #ea580c 100%);
  color: #fff;
  flex: 1;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Detail modal specifics */
.detail-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 8px;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.time-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.detail-section {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.detail-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text-main);
  font-weight: 500;
  word-break: break-word;
}

.highlight-location {
  color: var(--nathejk-amber);
  font-weight: 700;
  font-size: 1.05rem;
}

.detail-mini-map {
  height: 140px;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.btn-directions-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--status-claimed);
  text-decoration: none;
  font-weight: 600;
}

.photographers-tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.no-photographers-text {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.danger-zone {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.btn-text-danger {
  background: none;
  border: none;
  color: #f87171;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.app-footer {
  margin-top: auto;
  padding: 24px 16px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.mklabs-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.mklabs-icon {
  width: 18px;
  height: 18px;
}

.footer-links a {
  color: var(--nathejk-orange);
  text-decoration: none;
}

.footer-install-link {
  margin-top: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(255, 107, 0, 0.35);
  color: var(--nathejk-yellow);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
}

.footer-install-link:active {
  transform: scale(0.96);
}

/* ==========================================================================
   Responsive / Desktop Viewport
   ========================================================================== */
@media (min-width: 601px) {
  body {
    background-color: #040608;
    padding: 20px 0;
  }

  .app-container {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: calc(100vh - 40px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  }

  .modal-backdrop {
    align-items: center;
  }

  .modal-sheet {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    padding: 20px 24px;
  }
}
