/* CouncilTaxHero — custom styles */

html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

/* ---- Spinners ---- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-muted {
  width: 16px;
  height: 16px;
  border: 2.5px solid #e7e5e4;
  border-top-color: #0d9488;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* ---- Focus ring ---- */
input:focus-visible,
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* ---- Details/summary reset ---- */
details summary::-webkit-details-marker {
  display: none;
}
details summary {
  list-style: none;
}

/* ---- Skeleton shimmer for loading states ---- */
.skeleton {
  background: linear-gradient(90deg, #f5f5f4 25%, #e7e5e4 50%, #f5f5f4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

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

/* ---- Band distribution bar entrance ---- */
.bar-grow {
  animation: barGrow 0.6s ease-out forwards;
  transform-origin: left center;
}

@keyframes barGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ---- Savings number pop-in ---- */
.pop-in {
  animation: popIn 0.4s ease-out forwards;
}

@keyframes popIn {
  0%  { transform: scale(0.85); opacity: 0; }
  60% { transform: scale(1.04); }
  100%{ transform: scale(1); opacity: 1; }
}

/* ---- Subtle fade-up for section entrances ---- */
.fade-up {
  animation: fadeUp 0.35s ease-out both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Divider with text ---- */
.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e7e5e4;
}

/* ---- Mobile-friendly button touch targets ---- */
@media (max-width: 640px) {
  button[type="submit"],
  button.cta-button {
    min-height: 44px;
  }
}

/* ---- Benefits list styling ---- */
.benefits {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefits li svg {
  margin-top: 0.125rem; /* align checkmarks with first line of text */
}

/* ---- Modal backdrop blur ---- */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

/* ---- Neighbourhood map ---- */
.neighbourhood-map {
  height: 280px;
  background: #fafaf9;
}

@media (max-width: 640px) {
  .neighbourhood-map {
    height: 220px;
  }
}

/* Stone-tinted map tiles */
.neighbourhood-map .leaflet-tile-pane {
  filter: saturate(0.3) brightness(1.02) sepia(0.10);
}

/* Let scroll events pass through the static map */
.neighbourhood-map.leaflet-container {
  touch-action: auto !important;
  cursor: default !important;
}

/* Hide Leaflet default controls (attribution in invisible text for compliance) */
.neighbourhood-map .leaflet-control-container { display: none; }

/* Marker wrapper — remove Leaflet's default icon styling */
.ct-marker-wrapper {
  background: transparent !important;
  border: none !important;
}

/* Band-coloured circle marker */
.ct-marker {
  border-radius: 50%;
  border: 2.5px solid white;
  box-shadow: 0 1px 4px rgba(28, 25, 23, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 800;
  color: white;
  line-height: 1;
  transition: transform 0.15s ease-out;
}

/* Selected marker — larger with teal pulse ring */
.ct-marker--selected {
  border: 3px solid #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.25), 0 2px 6px rgba(28, 25, 23, 0.2);
  animation: markerPulse 2s ease-in-out infinite;
}

/* "YOU" label above selected marker */
.ct-marker-you {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: #0d9488;
  color: white;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 7px;
  white-space: nowrap;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* Tooltip styling */
.ct-tooltip .leaflet-popup-content-wrapper {
  background: #1c1917;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.25);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 12px;
  padding: 0;
}

.ct-tooltip .leaflet-popup-content {
  margin: 8px 12px;
  line-height: 1.4;
}

.ct-tooltip .leaflet-popup-tip {
  background: #1c1917;
}

.ct-tooltip-content strong {
  font-weight: 700;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.25), 0 2px 6px rgba(28, 25, 23, 0.2); }
  50%      { box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.08), 0 2px 6px rgba(28, 25, 23, 0.2); }
}

/* ---- Share-to-unlock buttons ---- */
.share-btn-facebook {
  background: #1877F2;
}
.share-btn-facebook:hover {
  background: #166fe5;
}

.share-btn-whatsapp {
  background: #25D366;
}
.share-btn-whatsapp:hover {
  background: #20bd5a;
}

/* ---- Smooth scroll to sections ---- */
html {
  scroll-padding-top: 4rem; /* Account for sticky nav */
}
