/* ==========================================================================
   PoolPulse Cape Town - Modern UI layer
   Loaded after styles.css. Refreshes typography, surfaces, live weather,
   map pins and the desktop presentation (no more fake phone chrome).
   ========================================================================== */

:root {
  --font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --ocean-900: #062a4d;
  --ocean-700: #0b4f8a;
  --ocean-500: #0a7cd8;
  --aqua-400: #22d3ee;
  --aqua-300: #67e8f9;

  --primary-blue: #0a6fd1;
  --primary-blue-hover: #075bb0;

  --bg-secondary: #f4f7fb;
  --border-light: #e4ebf3;

  --shadow-card: 0 1px 2px rgba(10, 40, 80, .04), 0 6px 18px -6px rgba(10, 40, 80, .10);
  --shadow-hover: 0 14px 34px -10px rgba(10, 60, 120, .22);
  --shadow-float: 0 10px 30px -8px rgba(6, 42, 77, .28);

  --radius-xl: 22px;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

html, body {
  font-family: var(--font-family);
  background: #eef2f7;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input { font-family: inherit; }

:focus-visible {
  outline: 3px solid rgba(34, 211, 238, .7);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Mobile-First App Viewport: Edge-to-edge on mobile, centered on desktop
   -------------------------------------------------------------------------- */
.app-viewport {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100vh;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: 0 0 45px rgba(6, 42, 77, 0.08);
}

@media (max-width: 600px) {
  html, body {
    background: var(--bg-secondary);
  }
  .app-viewport {
    max-width: 100%;
    height: 100dvh;
    box-shadow: none;
    border-radius: 0;
  }
}

/* --------------------------------------------------------------------------
   Ultra-Smooth Mobile Scrolling
   -------------------------------------------------------------------------- */
.screen-view {
  background: var(--bg-secondary);
  padding-bottom: 96px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  will-change: scroll-position;
}

.pools-list {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 32px;
}

.pool-card {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
  contain: content;
}

/* Hot weather crowd callout banner & badges */
.crowd-callout-hot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 11px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  font-size: 12px;
  color: #9f1239;
  line-height: 1.35;
}

.crowd-callout-hot .cc-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.crowd-callout-hot .cc-text {
  flex: 1;
}

.crowd-callout-hot .cc-phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: #e11d48;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.2);
}

.details-crowd-alert-card {
  margin: 14px 16px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1.5px solid #fda4af;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.08);
}

.details-crowd-alert-card .dca-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #be123c;
  margin-bottom: 4px;
}

.details-crowd-alert-card .dca-title {
  font-size: 16px;
  font-weight: 800;
  color: #9f1239;
  margin: 0 0 6px;
}

.details-crowd-alert-card .dca-desc {
  font-size: 13px;
  color: #881337;
  line-height: 1.45;
  margin: 0 0 12px;
}

.details-crowd-alert-card .dca-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: #e11d48;
  color: #ffffff;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}

.details-crowd-alert-card .dca-call-btn:hover {
  background: #be123c;
  transform: translateY(-1px);
}

/* Closed status details notice */
.details-closed-notice-card {
  margin: 14px 16px 0;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.details-closed-notice-card .dcn-icon {
  font-size: 22px;
  line-height: 1;
}

.details-closed-notice-card .dcn-title {
  font-size: 15px;
  font-weight: 800;
  color: #334155;
  margin: 0 0 4px;
}

.details-closed-notice-card .dcn-desc {
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

/* Screens are flex columns with overflow scroll: children must keep their
   natural height, otherwise sections (weather card, chips, icons) get squashed */
.screen-view > *,
.details-content-body > *,
.alerts-tab-content > *,
.favourites-tab-content > * { flex-shrink: 0; }
.filter-pills-bar { flex-shrink: 0; min-height: 52px; align-items: center; }
.filter-chip { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.app-top-bar {
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(228, 235, 243, .8);
}

.location-picker-btn { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.location-picker-btn .pin-icon { color: var(--ocean-500); }

.live-weather-badge {
  gap: 6px;
  padding: 6px 12px 6px 9px;
  background: linear-gradient(135deg, #fff7e6, #ffedd5);
  border: 1px solid #fde4bf;
  color: #9a4b07;
  font-weight: 700;
  transition: transform .2s var(--ease-spring), box-shadow .2s ease;
}
.live-weather-badge:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(234, 140, 20, .45); }
.live-weather-badge.is-refreshing .badge-wx-icon { animation: spin 1s linear infinite; }
.badge-wx-icon { display: inline-flex; color: #f59e0b; }

@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Live weather hero
   -------------------------------------------------------------------------- */
.weather-hero {
  position: relative;
  margin: 8px 14px 4px;
  padding: 10px 14px 8px;
  border-radius: 18px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-card);
  background: linear-gradient(145deg, #0a7cd8 0%, #22a6e8 55%, #5fd4f5 100%);
  transition: background .6s ease;
  animation: heroIn .4s ease-out;
}
.weather-hero::before,
.weather-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}
.weather-hero::before {
  width: 130px; height: 130px; right: -30px; top: -50px;
  background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 70%);
}
.weather-hero::after {
  width: 160px; height: 70px; left: -20px; bottom: -40px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .15), transparent 70%);
}

.weather-hero.wx-clear.is-day   { background: linear-gradient(145deg, #0a7cd8 0%, #1ea0ec 50%, #fbbf24 140%); }
.weather-hero.wx-partly.is-day  { background: linear-gradient(145deg, #2a6fb5 0%, #4b9fe0 55%, #9fd8f5 100%); }
.weather-hero.wx-cloudy,
.weather-hero.wx-fog            { background: linear-gradient(145deg, #475569 0%, #64748b 55%, #94a3b8 100%); }
.weather-hero.wx-rain,
.weather-hero.wx-snow           { background: linear-gradient(145deg, #1e3a5f 0%, #335c88 55%, #5b86b0 100%); }
.weather-hero.wx-storm          { background: linear-gradient(145deg, #1f1b3a 0%, #3b3470 55%, #5b4f9e 100%); }
.weather-hero.is-night          { background: linear-gradient(145deg, #0b1533 0%, #1b2a5c 55%, #31477f 100%); }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.wh-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wh-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  background: rgba(255, 255, 255, .18);
  padding: 2.5px 8px; border-radius: 999px;
  backdrop-filter: blur(6px);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, .7);
  animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); }
  70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.wh-temp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
.wh-temp-block { display: flex; align-items: baseline; gap: 8px; }
.wh-temp { font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.wh-meta-block { display: flex; flex-direction: column; }
.wh-cond { font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.wh-feels { font-size: 10.5px; opacity: .9; margin-top: 1px; font-weight: 500; }

.wh-icon { color: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .14)); display: flex; align-items: center; }
.wh-icon svg { width: 34px; height: 34px; }
.wh-icon .wx-sun { color: #fde68a; animation: spin 40s linear infinite; }

.wh-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 6px;
}
.wh-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 4px 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  min-height: 34px;
}
.wh-stat-icon { opacity: .85; display: inline-flex; }
.wh-stat-icon svg { width: 11px; height: 11px; }
.wh-stat-val { font-size: 10px; font-weight: 800; line-height: 1.15; }
.wh-stat-label { font-size: 8px; opacity: .8; font-weight: 600; text-transform: uppercase; letter-spacing: .25px; }

/* Keep home hero compact by hiding excessive hourly scroll blocks */
.wh-hourly {
  display: none !important;
}

.wh-advice {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .96);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.wh-advice::before {
  content: ""; flex-shrink: 0;
  width: 4px; align-self: stretch; border-radius: 4px;
  background: var(--status-open-green);
}
.wh-advice.tone-great::before { background: linear-gradient(#10b981, #22d3ee); }
.wh-advice.tone-meh::before { background: #f59e0b; }
.wh-advice.tone-bad::before { background: #ef4444; }
.wh-advice-text { flex: 1; display: flex; flex-direction: column; font-size: 10.5px; line-height: 1.25; color: var(--text-secondary); }
.wh-advice-text strong { font-size: 11.5px; font-weight: 800; color: #0f172a; }
.wh-advice-btn {
  flex-shrink: 0;
  border: 0; cursor: pointer;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--ocean-500), #22a6e8);
  box-shadow: 0 3px 8px -3px rgba(10, 124, 216, .7);
  transition: transform .2s var(--ease-spring);
  white-space: nowrap;
}
.wh-advice-btn:hover { transform: translateY(-1px) scale(1.02); }

.wh-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  font-size: 8.5px; opacity: .8; font-weight: 500;
}
.wh-refresh {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer;
  font-size: 9.5px; font-weight: 700;
  transition: background .2s ease, transform .3s ease;
}
.wh-refresh:hover { background: rgba(255, 255, 255, .28); transform: rotate(-30deg); }
.weather-hero.is-loading .wh-refresh svg { animation: spin 1s linear infinite; }

/* --------------------------------------------------------------------------
   Alerts banner, search, chips
   -------------------------------------------------------------------------- */
.maintenance-alert-banner {
  margin: 12px 16px 4px;
  border-radius: 18px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fffbeb, #fff4d6);
  border: 1px solid #fde7a8;
}
.alert-banner-link { text-decoration: none; }

.search-bar-container { background: transparent; padding: 12px 16px 6px; }
.search-input-box {
  height: 50px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}
.search-input-box:focus-within {
  border-color: var(--ocean-500);
  box-shadow: 0 0 0 4px rgba(10, 124, 216, .12);
}
.search-input { font-size: 15px; }

.filter-pills-bar { background: transparent; border-bottom: 0; padding: 8px 16px 6px; }
.filter-chip {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px rgba(10, 40, 80, .04);
  transition: all .2s ease;
}
.filter-chip:hover { border-color: #c7d6e6; transform: translateY(-1px); }
.filter-chip.active {
  background: linear-gradient(135deg, var(--ocean-500), #22a6e8);
  border-color: transparent;
  box-shadow: 0 6px 14px -6px rgba(10, 124, 216, .7);
}
.filter-chip.active .chip-dot { background: #fff !important; }

.section-title { font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.section-count-badge { background: #e6f1fc; color: var(--ocean-500); font-weight: 700; }

/* --------------------------------------------------------------------------
   Pool cards
   -------------------------------------------------------------------------- */
.pool-card {
  border-radius: 24px;
  border: 1px solid rgba(228, 235, 243, .9);
  transition: transform .25s var(--ease-spring), box-shadow .25s ease;
  animation: cardIn .4s ease-out both;
}
.pool-card:nth-child(2) { animation-delay: .04s; }
.pool-card:nth-child(3) { animation-delay: .08s; }
.pool-card:nth-child(4) { animation-delay: .12s; }
.pool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.pool-card-media { height: 168px; }
.pool-card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(2, 20, 40, .45));
  pointer-events: none;
}
.pool-card-media img { transition: transform .6s ease; }
.pool-card:hover .pool-card-media img { transform: scale(1.05); }
.pool-card-distance-tag, .pool-type-pill, .pool-card-favorite-btn, .pool-card-rating-tag { z-index: 2; }
.pool-type-pill { border-radius: 999px; padding: 4px 10px; backdrop-filter: blur(8px); background: rgba(255,255,255,.88); }
.pool-card-distance-tag { border-radius: 999px; padding: 5px 10px; background: rgba(6, 42, 77, .7); }
.pool-card-rating-tag {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(6, 42, 77, .78);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.pool-card-rating-tag i { color: #f59e0b; font-size: 11px; }

.pool-card-suburb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.pool-card-suburb-row .pool-card-suburb { margin-bottom: 0; }
.pool-card-rating-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.pool-card-rating-inline i { color: #f59e0b; font-size: 11px; }
.pool-card-rating-inline .pcr-score { font-weight: 800; color: #0f172a; }
.pool-card-rating-inline .pcr-count { font-size: 11px; font-weight: 500; color: #64748b; }
.pool-card-favorite-btn { backdrop-filter: blur(8px); }
.pool-card-body { padding: 14px 16px 16px; }
.pool-card-title { font-size: 17px; font-weight: 800; letter-spacing: -.2px; }

/* --------------------------------------------------------------------------
   Floating bottom nav
   -------------------------------------------------------------------------- */
.app-bottom-nav {
  left: 12px; right: 12px; bottom: 12px;
  height: 66px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 12px 30px -10px rgba(6, 42, 77, .3);
  padding: 0 6px;
}
.nav-item-btn { border-radius: 16px; transition: color .2s ease; }
.nav-item-btn .nav-item-icon {
  width: 46px; height: 30px; border-radius: 999px;
  transition: background .25s ease, transform .25s var(--ease-spring);
}
.nav-item-btn.active { color: var(--ocean-500); }
.nav-item-btn.active .nav-item-icon { background: #e3f0fc; transform: translateY(-1px); }
.nav-item-label { font-weight: 700; }
.nav-badge-count { top: -2px; right: 2px; box-shadow: 0 0 0 2px #fff; }

/* --------------------------------------------------------------------------
   Details: live weather grid
   -------------------------------------------------------------------------- */
.details-section-card { border-radius: 20px; }
.weather-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.weather-metric-item {
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
}
.weather-metric-val { font-size: 14px; font-weight: 800; }
.weather-metric-item.wm-hero {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 12px;
  color: #fff; border: 0;
  background: linear-gradient(135deg, #0a7cd8, #38bdf8);
}
.weather-metric-item.wm-hero.wx-cloudy,
.weather-metric-item.wm-hero.wx-fog { background: linear-gradient(135deg, #475569, #94a3b8); }
.weather-metric-item.wm-hero.wx-rain,
.weather-metric-item.wm-hero.wx-storm { background: linear-gradient(135deg, #1e3a5f, #5b86b0); }
.wm-hero .weather-metric-title, .wm-hero .weather-metric-val { color: #fff; }
.wm-hero .weather-metric-title { opacity: .9; }
.wm-hero-icon { display: inline-flex; }
.wm-hero-text { flex: 1; }
.wm-hero-temp { font-size: 26px; font-weight: 800; letter-spacing: -1px; line-height: 1.05; }
.wm-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .2);
}

/* --------------------------------------------------------------------------
   Map screen
   -------------------------------------------------------------------------- */
.leaflet-map-element { background: #dfe9f2; }

.map-top-controls { top: 14px; left: 12px; right: 12px; gap: 10px; }
.map-control-bar {
  padding: 6px 6px 6px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-float);
}
.map-title { font-size: 15px; font-weight: 800; }
.map-style-toggle { background: #eef3f8; padding: 3px; }
.map-toggle-btn { padding: 6px 12px; font-weight: 700; }

.map-status-filter {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 2px;
}
.map-status-filter::-webkit-scrollbar { display: none; }
.map-filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px -4px rgba(6, 42, 77, .25);
  font-size: 12.5px; font-weight: 700; color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s ease;
}
.map-filter-chip:hover { transform: translateY(-1px); }
.mf-dot { width: 8px; height: 8px; border-radius: 50%; }
.map-filter-chip.open .mf-dot { background: #10b981; }
.map-filter-chip.closed .mf-dot { background: #ef4444; }
.map-filter-chip.works .mf-dot { background: #f59e0b; }
.mf-count {
  min-width: 20px; padding: 1px 6px;
  border-radius: 999px;
  background: #eef3f8; color: var(--text-secondary);
  font-size: 11px; text-align: center;
}
.map-filter-chip.active { color: #fff; border-color: transparent; }
.map-filter-chip.active .mf-count { background: rgba(255, 255, 255, .25); color: #fff; }
.map-filter-chip.active .mf-dot { background: #fff; }
.map-filter-chip.active[data-map-filter="all"] { background: linear-gradient(135deg, var(--ocean-700), var(--ocean-500)); }
.map-filter-chip.active.open { background: linear-gradient(135deg, #059669, #10b981); }
.map-filter-chip.active.closed { background: linear-gradient(135deg, #dc2626, #ef4444); }
.map-filter-chip.active.works { background: linear-gradient(135deg, #d97706, #f59e0b); }

.map-side-controls {
  position: absolute;
  right: 12px; top: 128px;
  z-index: 1000;
  display: flex; flex-direction: column; gap: 8px;
}
.map-fab {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  box-shadow: 0 6px 16px -6px rgba(6, 42, 77, .35);
  cursor: pointer;
  transition: transform .2s var(--ease-spring), background .2s ease;
}
.map-fab:hover { transform: scale(1.06); }
.map-fab.accent { background: linear-gradient(135deg, var(--ocean-500), #22a6e8); color: #fff; border-color: transparent; }

.map-legend {
  position: absolute;
  left: 12px; bottom: 92px;
  z-index: 900;
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 16px -6px rgba(6, 42, 77, .3);
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  transition: opacity .2s ease, transform .2s ease;
}
.map-view-container.card-open .map-legend { opacity: 0; transform: translateY(8px); pointer-events: none; }
.lg-item { display: inline-flex; align-items: center; gap: 5px; }
.lg-pin { width: 11px; height: 11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.lg-pin.open { background: #10b981; }
.lg-pin.closed { background: #ef4444; }
.lg-pin.works { background: #f59e0b; }
.lg-pin.you { background: var(--ocean-500); border-radius: 50%; transform: none; }

.leaflet-control-attribution {
  font-size: 9px !important;
  background: rgba(255, 255, 255, .7) !important;
  border-radius: 8px 0 0 0;
  margin-bottom: 84px !important;
}

/* Status-aware pool pins */
.pp-pin-wrap { background: none; border: 0; }
.pp-pin {
  position: relative;
  width: 36px; height: 46px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transform-origin: 50% 100%;
  transition: transform .22s var(--ease-spring), filter .2s ease;
  filter: drop-shadow(0 4px 6px rgba(10, 25, 45, .28));
}
.pp-pin:hover { transform: scale(1.15) translateY(-3px); }
.pp-pin-head {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.pp-pin-tip {
  width: 0; height: 0;
  margin-top: -2px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #fff;
}
.pp-pin-badge {
  display: none !important;
}

.pp-pin.open .pp-pin-head { background: linear-gradient(135deg, #10b981, #059669); }
.pp-pin.open .pp-pin-tip { border-top-color: #059669; }
.pp-pin.open .pp-pin-head::after {
  content: ""; position: absolute; inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, .6);
  animation: pinRipple 2.2s ease-out infinite;
}
@keyframes pinRipple {
  0% { transform: scale(.9); opacity: 1; }
  100% { transform: scale(1.45); opacity: 0; }
}

.pp-pin.closed .pp-pin-head { background: linear-gradient(135deg, #ef4444, #be123c); }
.pp-pin.closed .pp-pin-tip { border-top-color: #be123c; }
.pp-pin.closed { filter: drop-shadow(0 4px 6px rgba(180, 20, 40, .28)); }

.pp-pin.maintenance .pp-pin-head,
.pp-pin.opening-soon .pp-pin-head { background: linear-gradient(135deg, #f59e0b, #d97706); }
.pp-pin.maintenance .pp-pin-tip,
.pp-pin.opening-soon .pp-pin-tip { border-top-color: #d97706; }

.pp-pin.active { transform: scale(1.22) translateY(-4px); z-index: 999; }
.pp-pin.active .pp-pin-head { border-color: #fff; box-shadow: 0 0 0 4px rgba(0, 148, 216, .55); }

/* Smaller pins when zoomed out to reduce overlap */
.pins-mid .pp-pin { transform: scale(.82); }
.pins-mid .pp-pin:hover { transform: scale(1); }
.pins-compact .pp-pin { transform: scale(.65); }
.pins-compact .pp-pin:hover { transform: scale(.88); }
.pins-compact .pp-pin .pp-pin-head::after { display: none; }
.pins-mid .pp-pin.active, .pins-compact .pp-pin.active { transform: scale(1.15); }

/* Smooth Touch Map Gestures */
#leafletMap, .leaflet-map-element, .leaflet-container {
  touch-action: pan-x pan-y pinch-zoom !important;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Google Reviews & Community Ratings */
.google-reviews-card {
  border: 1px solid rgba(66, 133, 244, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.google-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

.google-rating-pill .gr-score {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.google-rating-pill .gr-stars {
  color: #eab308;
  font-size: 12px;
  display: flex;
  gap: 2px;
}

.google-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.google-summary-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.google-large-score {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
}

.google-stars-big {
  color: #eab308;
  font-size: 14px;
  display: flex;
  gap: 2px;
}

.google-count-text {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.google-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.google-review-item {
  background: #ffffff;
  border-radius: 12px;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.gr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.gr-author-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gr-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b3b66, #0094d8);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.gr-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.gr-date {
  font-size: 11px;
  color: #94a3b8;
}

.gr-stars-item {
  color: #eab308;
  font-size: 11px;
  display: flex;
  gap: 2px;
}

.gr-comment {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.45;
  margin: 0;
}

.google-profile-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #0b3b66;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.google-profile-action-btn:hover {
  background: #f8fafc;
  border-color: #0094d8;
  color: #0094d8;
}

/* "You are here" */
.pp-you-wrap { background: none; border: 0; }
.pp-you { position: relative; width: 24px; height: 24px; }
.pp-you-dot {
  position: absolute; inset: 5px;
  border-radius: 50%;
  background: var(--ocean-500);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.pp-you-pulse {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(10, 124, 216, .35);
  animation: youPulse 2s ease-out infinite;
}
@keyframes youPulse { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }

/* Tooltips */
.leaflet-tooltip.pp-tooltip {
  border: 0;
  border-radius: 12px;
  padding: 7px 10px;
  font-family: var(--font-family);
  font-size: 12px;
  color: var(--text-primary);
  box-shadow: 0 8px 20px -6px rgba(6, 42, 77, .35);
  display: flex; flex-direction: column; gap: 2px;
}
.pp-tooltip strong { font-weight: 800; }
.tt-status { font-size: 11px; font-weight: 700; }
.tt-status.open { color: #059669; }
.tt-status.closed { color: #dc2626; }
.tt-status.maintenance { color: #d97706; }

/* Map preview card */
.map-bottom-card {
  bottom: 92px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
  padding: 14px;
  animation: slideUp .3s var(--ease-spring);
}
.map-card-thumb { width: 78px; height: 78px; border-radius: 16px; }
.map-card-name { font-size: 16px; font-weight: 800; padding-right: 24px; }
.map-card-meta { flex-wrap: wrap; }
#mapCardDistance { display: flex; align-items: center; gap: 10px; }
#mapCardDistance > span { display: inline-flex; align-items: center; gap: 4px; }
.map-card-wx { color: var(--ocean-500); }
.map-card-btn-directions {
  border-radius: 14px; padding: 11px 12px;
  background: linear-gradient(135deg, var(--ocean-500), #22a6e8);
  box-shadow: 0 6px 14px -6px rgba(10, 124, 216, .7);
}
.map-card-btn-details { border-radius: 14px; padding: 11px 14px; font-weight: 700; }

/* Splash weather pill icon */
.splash-weather-icon { display: inline-flex; color: #fde68a; }

/* Primary buttons */
.btn-primary-blue, .start-navigation-btn {
  background: linear-gradient(135deg, var(--ocean-500), #22a6e8) !important;
  box-shadow: 0 8px 18px -8px rgba(10, 124, 216, .8);
  border-radius: 16px !important;
}

/* --------------------------------------------------------------------------
   Floating Circular Action Buttons & Details Scroll View
   -------------------------------------------------------------------------- */
.pool-details-view {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  padding-bottom: 0 !important;
}

.details-scroll-body {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  padding-bottom: 110px;
}

.details-floating-fab-group {
  position: absolute;
  right: 18px;
  bottom: calc(80px + env(safe-area-inset-bottom, 12px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1200;
  pointer-events: auto;
}

.details-fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 24px -4px rgba(6, 42, 77, 0.45), 0 4px 10px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s cubic-bezier(.34, 1.56, .64, 1), box-shadow 0.2s ease;
}

.details-fab:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 14px 30px -4px rgba(6, 42, 77, 0.55);
}

.details-fab:active {
  transform: scale(0.92);
}

.details-fab.fab-call {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.details-fab.fab-directions {
  background: linear-gradient(135deg, #0a7cd8 0%, #0284c7 100%);
}

/* --------------------------------------------------------------------------
   Share Sheet Modal (WhatsApp, X, Facebook, Copy Link)
   -------------------------------------------------------------------------- */
.share-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 26, 48, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.share-modal-sheet {
  width: 100%;
  max-width: 560px;
  background: #ffffff;
  border-radius: 26px 26px 0 0;
  padding: 16px 20px 32px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.25s cubic-bezier(.34, 1.3, .64, 1);
  position: relative;
}

.share-modal-handle {
  width: 44px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 99px;
  margin: 0 auto 14px;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sm-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.sm-subtitle {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

.sm-close-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s ease;
}

.sm-close-btn:hover {
  background: #e2e8f0;
}

.share-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.share-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: transform 0.18s ease;
}

.share-option-btn:hover {
  transform: translateY(-2px);
}

.share-option-btn:active {
  transform: scale(0.92);
}

.share-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.share-icon-circle.whatsapp-bg {
  background: #25D366;
}

.share-icon-circle.facebook-bg {
  background: #1877F2;
}

.share-icon-circle.x-bg {
  background: #000000;
}

.share-icon-circle.copy-bg {
  background: #0a7cd8;
}

.share-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.share-link-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--text-secondary);
  outline: none;
  font-family: inherit;
}

.share-link-box button {
  padding: 7px 16px;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.share-link-box button:hover {
  background: var(--primary-blue-hover);
}

/* --------------------------------------------------------------------------
   App Toast Notification
   -------------------------------------------------------------------------- */
.app-toast {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.3);
  z-index: 3000;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.2s ease-out;
}

/* --------------------------------------------------------------------------
   Mobile Safe Area & Fluid Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .app-top-bar { padding-top: max(14px, env(safe-area-inset-top)); }
  .app-bottom-nav { bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   PWA Installation UI & Buttons
   -------------------------------------------------------------------------- */
.top-bar-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pwa-install-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-install-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

.pwa-install-badge.hidden {
  display: none !important;
}

.splash-install-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg, 16px);
  padding: 10px 16px;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 10px;
}

.splash-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.splash-install-btn.hidden {
  display: none !important;
}

.pwa-btn-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0284c7;
}

.pwa-btn-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pwa-btn-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.pwa-btn-text strong {
  font-size: 13.5px;
  font-weight: 700;
  color: #0b3b66;
}

.pwa-btn-text small {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

/* PWA Install Sheet Modal */
.pwa-install-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.pwa-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pwa-install-sheet {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  z-index: 10;
  animation: pwaSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pwa-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pwa-sheet-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-sheet-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.pwa-sheet-brand h3 {
  font-size: 16px;
  font-weight: 800;
  color: #0b3b66;
  margin: 0;
}

.pwa-sheet-brand p {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0;
}

.pwa-sheet-close {
  background: #f1f5f9;
  border: none;
  font-size: 24px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwa-sheet-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 16px;
}

.pwa-instructions-ios {
  display: none;
}

.pwa-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #1e293b;
}

.pwa-step-num {
  width: 24px;
  height: 24px;
  background: #0284c7;
  color: #ffffff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-primary-install-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

/* --------------------------------------------------------------------------
   Performance & Ultra-Smooth Mobile Scrolling Enhancements
   -------------------------------------------------------------------------- */
.pool-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 340px;
  touch-action: manipulation;
  transform: translateZ(0);
}

.pool-card:active {
  transform: scale(0.985);
  transition: transform 0.08s ease-out;
}

/* Fast tap response & zero 300ms touch delay across all buttons */
button,
a,
.nav-item-btn,
.filter-chip,
.splash-start-btn,
.splash-install-btn,
.start-navigation-btn,
.quick-call-btn,
.nav-icon-btn,
.pwa-primary-install-btn,
.pwa-install-badge,
.map-fab,
.map-card-btn-directions,
.map-card-btn-details,
.dca-call-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Immediate tactile feedback on button press */
.nav-item-btn:active,
.filter-chip:active,
.splash-start-btn:active,
.splash-install-btn:active,
.start-navigation-btn:active,
.quick-call-btn:active,
.nav-icon-btn:active,
.pwa-primary-install-btn:active,
.map-card-btn-directions:active,
.map-card-btn-details:active {
  transform: scale(0.96);
  transition: transform 0.06s ease-out;
}

/* Hardware accelerated smooth scrolling containers */
.app-viewport,
.screen-view,
.details-scroll-body,
.pools-list-container {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
}

/* Image aspect ratio container & async rendering layout preservation */
.pool-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background-color: #0f172a;
  overflow: hidden;
}

.pool-card-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.pool-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.details-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 320px;
  background-color: #0f172a;
  overflow: hidden;
}

.details-hero picture {
  display: block;
  width: 100%;
  height: 100%;
}

.details-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Screen-reader & Search Crawler SEO Indexing */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


