/* ==========================================================================
   1. ROOT & GLOBAL STYLES
   ========================================================================== */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
}


:root {
  /* Map / search layout */
  --locate-btn-space: 56px; /* ~22 icon + 20 padding + borders + 10px gap */
  --map-bottom-gap: 1rem;   /* match map padding + bottom card gap */

  /* Right panel & cards */
  --rp-gap: 0px;
  --rp-pad: 16px;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --c-bg: #fff;
  --c-text: #1e293b;
  --c-muted: #64748b;
  --c-muted-2: #718096;
  --c-label: #4a5568;
  --c-value: #2d3748;
  --c-border: #e2e8f0;
  --c-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --c-sticky-fade: linear-gradient(to bottom, rgba(0, 0, 0, 0.08), transparent);

  --c-primary: #2563eb;
  --c-primary-hover: #1d4ed8;
  --c-success: #16a34a;

  --r-md: 12px;
  --r-lg: 16px;

  --fs-base: 0.95rem;
  --fs-title: 1.05rem;

  --in-pad-v: 9px;
  --in-pad-h: 11px;
  --in-radius: 10px;
  --in-border: 1.6px solid #cbd5e1;
}

/* ==========================================================================
   2. LAYOUT: MAP & PANELS
   ========================================================================== */
   /* Hide the map until JS marks it ready */
#map.map-is-loading {
  visibility: hidden;   /* or opacity: 0 if you prefer a fade-in */
}
#map {
  width: 100%;
  height: 100%;
  padding-bottom: var(--map-bottom-gap);
}

#divider {
  width: 8px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  z-index: 10;
}

/* ==========================================================================
   3. SEARCH CONTAINER (Default & At-Top States)
   ========================================================================== */
.map-search-container {
  position: absolute;
  z-index: 1000;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100vw - var(--locate-btn-space)) ;
  max-width: calc(700px - var(--locate-btn-space)) !important;
  transition: top 0.25s ease, transform 0.25s ease, width 0.25s ease;
  pointer-events: none;
}

.map-search-container > div {
  pointer-events: auto;
}

.map-search-container.at-top {
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(90vw) !important;
  max-width: calc(700px) !important;
}

/* Input styling */
.map-search-container input {
  font-size: 1.5rem !important;
  padding: 0.6rem 0rem !important;
  border-radius: 50px;
  width: 100%;
  border: 4px solid #ccc;

  transition: all 0.25s ease;
  background: #fff;
  box-sizing: border-box;
}

.map-search-container input:hover {
  border-color: #0077cc;
  transform: scale(1.02);
}

.map-search-container.at-top input {
  font-size: 1.2rem;
  padding: 0.8rem 2.5rem;
  border: 4px solid #bbb;
}

.map-search-container.at-top input:hover {
  border-color: #0077cc;
  transform: scale(1.01);
}

#search-input {
  padding-left: 0px !important;
}
#search-input {
  padding-left: 55px !important;  /* locate + search icon spacing */
  padding-right: 40px !important; /* room for clear X */
}

/* Z-index layering */
.leaflet-top,
.leaflet-bottom {
  z-index: 400;
}

/* ==========================================================================
   4. LOCATE BUTTON
   ========================================================================== */
.locate-btn {
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  border-radius: 9999px;
  padding: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.locate-btn:hover {
  box-shadow: 0 0 0 4px #0076cd; /* EXACT same ring as input */
}

.locate-btn svg {
  width: 35px !important;
  height: 35px !important;
  color: #2563eb;
  transition: transform 0.2s ease;
}

.locate-btn:hover svg {
  transform: scale(1.1);
}


/* ==========================================================================
   5. ICONS (Search, Clear, etc.)
   ========================================================================== */
   #mapSearchContainer .absolute.left-3 {
  left: 42px !important;
  display: none !important;
}

#mapSearchContainer svg.h-4.w-4 {
  width: 1.8rem;
  height: 1.8rem;
  margin-left: 10px;
  margin-right: 10px;
}

#clear-search svg {
  width: 1.3rem;
  height: 1.3rem;
}

.map-search-container:not(.at-top) #clear-search svg {
  width: 1.6rem;
  height: 1.6rem;
}

#clear-search,
.map-search-container .absolute.left-3 {
  top: 50%;
  transform: translateY(-50%);
}

/* Smooth split animation for panels */
/* Smooth split animation for panels (only after JS enables it) */
#leftPanel.panels-ready,
#rightPanel.panels-ready {
  transition: width 0.2s ease;
}

/* Collapsed right panel */
.panel--collapsed {
  width: 0;          /* animate to 0 */
  min-width: 0;
  overflow: hidden !important;
  padding: 0 !important;
}

/* Divider fade instead of hard hide */
.divider--hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* Right panel & divider are hidden on initial load */
#rightPanel,
#divider {
  display: none;
}


/* ==========================================================================
   6. MOBILE LAYOUT (≤640px)
   ========================================================================== */
@media (max-width: 768px) {

    .timeline-mobile-hide {
    display: none !important;
  }

  /* Hide divider + zoom buttons on small screens */
  #divider,
  .leaflet-control-zoom {
    display: none !important;
  }

  #leftPanel {
    width: 100% !important;
  }

  /* Base transitions for both panels on mobile */
  #leftPanel,
  #rightPanel {
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  /* Default (map visible, panel hidden/offscreen) */
  #rightPanel {
    transform: translateX(100%);
    opacity: 0;
  }

  /* When the details panel is open on mobile */
  body.layout-mobile-panel-open #leftPanel {
    transform: translateX(-15%);
    opacity: 0;
    pointer-events: none;
  }

  body.layout-mobile-panel-open #rightPanel {
    display: flex !important;
    position: absolute;
    inset: 0;
    z-index: 500;
    width: 100% !important;
    height: 100vh;
    background: #f3f4f6;
    transform: translateX(0);
    opacity: 1;
  }
}
.mobile-back-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: #0076cd;
    color: rgb(255, 255, 255);
    border-radius: 9999px;
    padding: 0px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 600;

  }

  .mobile-back-btn span {
    font-size: 0.9rem;
  }
}


/* ==========================================================================
   7. LEAFLET MARKERS & ECC PIN
   ========================================================================== */
.leaflet-marker-icon.ecct-pin,
.leaflet-marker-icon.ecct-pin * {
  box-sizing: border-box;
}

.leaflet-marker-icon.ecct-pin {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
}

/* Core pin structure */
.ecct-pin .dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  border: 4px solid #fff;
  border-radius: 9999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* Pulse */
.ecct-pin .pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%) scale(0.6);
  border-radius: 9999px;
  animation: ecct-pulse 1.8s ease-out infinite;
  pointer-events: none;
}

/* Default (cyan) */
.ecct-pin .dot {
  background: #0ea5e9;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(14, 165, 233, 0.25);
}

.ecct-pin .pulse {
  border: 3px solid rgba(14, 165, 233, 0.45);
}

/* State variants */
.ecct-pin .dot.state-cyan {
  background: #0ea5e9;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(14, 165, 233, 0.25);
}

.ecct-pin .pulse.state-cyan {
  border: 3px solid rgba(14, 165, 233, 0.45);
}

.ecct-pin .dot.state-orange {
  background: #f97316;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(249, 115, 22, 0.25);
}

.ecct-pin .pulse.state-orange {
  border: 3px solid rgba(249, 115, 22, 0.45);
}

.ecct-pin .dot.state-red {
  background: #ef4444;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(239, 68, 68, 0.25);
}

.ecct-pin .pulse.state-red {
  border: 3px solid rgba(239, 68, 68, 0.45);
}

/* Pulse animation */
@keyframes ecct-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.65);
    opacity: 0.8;
  }
  70% {
    transform: translate(-50%, -50%) scale(1.45);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* Hover enhancement */
.leaflet-marker-icon.ecct-pin:hover .dot {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.28),
    0 0 0 4px rgba(14, 165, 233, 0.28);
}

/* ==========================================================================
   8. POPUPS (Action & General)
   ========================================================================== */
.leaflet-popup.ecct-action-popup {
  margin-left: 0;
}

.leaflet-popup-content-wrapper {
  border-radius: 10px;
}

.ecct-popup-wrap {
  font-family: "Inter", system-ui, sans-serif;
  min-width: 180px;
}

.ecct-popup-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}

.ecct-popup-actions {
  display: flex;
  gap: 8px;
}

.ecct-btn {
  appearance: none;
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  border-radius: 9999px;
  background: #fff;
  color: #1f2937;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.ecct-btn:hover {
  background: #f3f4f6;
  border-color: #cbd5e1;
}

.ecct-btn:active {
  transform: translateY(1px);
}

.ecct-btn.yes {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}

.ecct-btn.yes:hover {
  background: #1d4ed8;
  border-color: #1e40af;
}

/* ==========================================================================
   9. GOOGLE PLACES AUTOCOMPLETE
   ========================================================================== */
.pac-container {
  border-radius: 10px !important;
  margin-top: 6px !important;
  border: 1px solid #e5e7eb !important;
  overflow: hidden !important;
  font-family: "Inter", system-ui, sans-serif !important;
  z-index: 2000 !important;
  padding: 4px !important;
  background: #fff !important;
}

.pac-item {
  padding: 6px 10px !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
  color: #374151 !important;
  border-radius: 6px !important;
  margin: 1px 0 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

.pac-item:hover,
.pac-item-selected {
  background-color: #e2e2e2 !important;
  border-radius: 10px !important;
  color: #111827 !important;
}

.pac-item-query {
  color: #111827 !important;
  font-weight: 500 !important;
}

.pac-matched {
  color: #2563eb !important;
}

.pac-item:not(:last-child) {
  border-bottom: 1px solid #f9fafb !important;
}

.pac-logo {
  padding: 3px 10px !important;
  background: #f9fafb !important;
  border-top: 1px solid #e5e7eb !important;
  text-align: right !important;
}

/* ==========================================================================
   10. SERVICE OVERLAY (SVC Card)
   ========================================================================== */
.svc-overlay {
  position: absolute;
  z-index: 1100;
  display: none;
  background: #fff;
  border: 3px solid #2563eb;
  border-radius: 14px;
  padding: 16px;
  font-family: "Inter", system-ui, sans-serif;
  pointer-events: auto;
  width: 250px;
  max-width: 90vw;
  text-align: center;
}

.svc-overlay.mobile {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(92vw, 4000px);
}

.svc-coords {
  font-size: 0.86rem;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 10px;
  word-break: break-word;
}

.svc-address-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 5px 10px;
  text-align: left;
  margin-bottom: 12px;
}

.svc-address-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #475569;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.svc-address {
  font-size: 0.68rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.25;
  word-break: break-word;
}

.svc-btn-check {
  appearance: none;
  border: none;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.05s;
  width: 100%;
}

.svc-btn-check:hover {
  background: #1d4ed8;
}

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

/* ==========================================================================
   11. RIGHT-PANEL BOTTOM GAP (Req card)
   ========================================================================== */
#req-submit-card,
.req-card {
  margin-bottom: var(--map-bottom-gap) !important;
}

@media (max-width: 768px) {
  #req-submit-card,
  .req-card {
    margin-bottom: calc(var(--map-bottom-gap) * 0.75) !important;
  }
}

/* ==========================================================================
   12. RIGHT PANEL & CARDS
   ========================================================================== */
#rightPanel {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.right-panel__content {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: var(--rp-gap);
  padding: 0;
  overflow: hidden;             /* ⬅️ no global scroll here */
  box-sizing: border-box;
  font-family: var(--font-ui);
}


/* Card base */
.info-card,
.rp-card,
.req-card {
  background: var(--c-bg);
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  overflow: hidden;
  transition: none;
}

.info-card:hover,
.rp-card:hover,
.req-card:hover {
  transform: none;
}

/* Card layout */
.info-card {
  display: flex;
  flex-direction: column;
}

.info-card__body {
  flex: 1;
}

/* Headers */
.info-card__header,
.rp-card__header {
  background: linear-gradient(135deg, #5a67d8 0%, #7c3aed 100%);
  padding: 3px 18px;
  color: #fff;
}

.info-card__title {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.info-card__body,
.rp-card__body {
  padding: 5px 18px;
}

/* Rows */
.info-row,
.rp-kv {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: var(--fs-base);
}

.info-row:last-child,
.rp-kv:last-child {
  margin-bottom: 0;
}

.info-label,
.rp-kv__label {
  color: var(--c-label);
  font-weight: 500;
  min-width: 100px;
}

.info-value,
.rp-kv__value {
  color: var(--c-value);
  font-weight: 500;
  text-align: right;
  flex: 1;
}

/* Status area */
.status-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #cbd5e0;
}

.status-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.status-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
/* Top, middle, bottom layout inside right panel */
#address-card {
  flex: 0 0 auto;              /* pinned to top */
}

#analysis-card {
  flex: 1 1 auto;              /* fills middle */
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#analysis-card .info-card__body {
  flex: 1 1 auto;
  overflow-y: auto;            /* scrolls if content is tall */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

#req-submit-card {
  flex: 0 0 auto;              /* pinned to bottom */
  margin-top: auto;            /* pushes it down */
}


/* Force static blue headers for Address + Timeline cards */
#address-card .info-card__header,
.timeline-card .info-card__header,
#req-submit-card .info-card__header {
  background: #0077cc !important;
  color: #fff !important;
}




/* Inner timeline wrappers */
.tl-content,
.tl-progress,
.tl-body {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* "No service" text */
.timeline-empty {
  text-align: center;
  color: #dc2626;
  font-weight: 600;
  line-height: 1.45;
  font-size: 0.95rem;
}

/* Mobile tweaks for timeline body */
@media (max-width: 768px) {
  .timeline-card .info-card__body {
    gap: 12px;
    padding: 12px;
  }
}

/* Horizontal progress bar (if you use it) */
.tl-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tl-content {
  justify-content: center;
  min-height: 220px;
}

.tl-notice {
  position: sticky;
  top: 0;
  z-index: 1;
  align-self: stretch;
  margin: -6px -6px 8px;
  padding: 8px 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 8px;
  color: #92400e;
  font-weight: 600;
  text-align: center;
}

/* progress container */
.tl-progress {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 18px 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* label above the bar */
.tl-progress__head {
  font-weight: 700;
  color: #0f172a;
  text-align: center;
  margin-bottom: 8px;
}

/* track + fill */
.tl-progress__track {
  position: relative;
  height: 8px;
  border-radius: 9999px;
  background: #e5e7eb;
  overflow: hidden;
}

.tl-progress__fill {
  height: 100%;
  background: #2563eb;
  border-radius: 9999px;
  transition: width 0.25s ease;
}

/* dots */
.tl-dots {
  pointer-events: none;
}

.tl-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  border: 2px solid #94a3b8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
}

.tl-dot.done {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.tl-dot.todo {
  border-color: #cbd5e1;
  background: #fff;
  color: #9ca3af;
}

/* optional decision icon */
.tl-decision {
  margin-top: 10px;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.tl-decision.ok {
  background: #16a34a;
  color: #fff;
}

.tl-decision.nope {
  background: #ef4444;
  color: #fff;
}

/* Service request card */
.req-card {
  margin-top: auto;
  width: 100%;
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 auto;
  z-index: 10;
  font-family: "Inter", var(--font-ui);
}

.req-card__title {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--c-text);
  text-align: center;
  margin-bottom: 5px;
}

/* Buttons & inputs */
.btn {
  width: 100%;
  padding: 9px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
  font-weight: 600;
  font-size: 13.8px;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn--pill {
  border-radius: 9999px;
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}

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

.btn-success {
  background: var(--c-success);
  color: #fff;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.input {
  width: 100%;
  padding: var(--in-pad-v) var(--in-pad-h);
  border: var(--in-border);
  border-radius: var(--in-radius);
  font-size: 13.8px;
  background: #fafafa;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.input:focus {
  border-color: #3b82f6;
  background: #fff;
}

.input[disabled] {
  background: #f1f5f9;
  color: #94a3b8;
}

.link-button {
  width: 100%;
  padding: 9px;
  border-radius: 9999px;
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
  font-size: 13.8px;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease;
}

.link-button:hover {
  background: var(--c-primary-hover);
}

.inline-notice {
  font-size: 12.5px;
  color: #dc2626;
  margin: 6px 0;
}

/* Text utilities */
.text-danger {
  color: #dc2626;
}

.text-muted {
  color: var(--c-muted);
  font-size: 0.875rem;
}

.text-xs {
  font-size: 11.2px;
}

.text-sm {
  font-size: 11.5px;
}

/* Responsive rows */
@media (max-width: 768px) {
  .info-row,
  .rp-kv {
    flex-direction: column;
    gap: 4px;
  }

  .info-label,
  .rp-kv__label {
    min-width: auto;
    font-weight: 600;
    color: var(--c-value);
  }

  .info-value,
  .rp-kv__value {
    text-align: left;
  }
}



/* ==========================================================================
   13. LEAFLET ATTRIBUTION (Custom ECC Style)
   ========================================================================== */
   /* Make the entire ZoomHome control a pill */
   
.leaflet-control-zoomhome.leaflet-bar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px !important;
  border: 2px solid #c2c2c2 !important;
  background: #ffffff !important;
}

/* Each button inside the pill */
.leaflet-control-zoomhome.leaflet-bar a {
  width: 32px;
  height: 32px;
  line-height: 32px;
  border-radius: 0 !important;          /* ⬅️ inside the pill, no rounding */
  border: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  color: #2563eb !important;
  font-weight: 700;
  text-align: center;
  background: transparent !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Remove border below final button */
.leaflet-control-zoomhome.leaflet-bar a:last-child {
  border-bottom: none !important;
}

/* Hover */
.leaflet-control-zoomhome.leaflet-bar a:hover {
  background: #f1f5f9 !important;
}

/* Middle button (home) — stronger visual */
.leaflet-control-zoomhome-home {
  font-size: 16px;
  color: #1e293b !important;
}

.leaflet-control-zoomhome-home svg {
  display: block;
  margin: auto;
}

.leaflet-control-attribution a:hover span {
  color: #0077cc;
}
.leaflet-control-attribution {
  background: transparent !important;
}

.leaflet-control-attribution img {
  display: inline-block;
  height: 16px;
  width: auto;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.3));
}

/* ==========================================================================
   14. MISCELLANEOUS
   ========================================================================== */
.crisp-line {
  vector-effect: non-scaling-stroke;
  shape-rendering: geometricPrecision;
}

/* ==========================================================================
   15. TIMELINE DONUT + ACCORDION
   ========================================================================== */
.timeline-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.timeline-progress__donut-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.timeline-progress__donut {
  position: relative;
  width: 150px;
  height: 150px;
  flex: 0 0 150px;
}

.timeline-progress__svg {
  display: block;
  width: 150px;
  height: 150px;
}

.timeline-progress__ring-bg {
  fill: none;
  stroke: #e6f0ff;
  stroke-width: 18;
  stroke-linecap: round;
}

.timeline-progress__ring-fg {
  fill: none;
  stroke-width: 18;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 75px 75px;
  transition: stroke-dashoffset 0.35s ease;
}

.timeline-progress__center {
  position: absolute;
  inset: 0;
}

.timeline-progress__percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56%);
  font-size: 34px;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  white-space: nowrap;
}

.timeline-progress__icon {
  position: absolute;
  top: calc(50% + 8px);
  left: 50%;
  transform: translate(-50%, 0);
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* Accordion base */
.timeline-accordion {
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
  padding: 0 8px;
}

.timeline-accordion__checkbox {
  display: none;
}

.timeline-accordion__pill-toggle {
  border-radius: 12px;
  padding: 7px 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: 0.2px;
  cursor: pointer;
  text-align: left;
}

/* default state */
.timeline-accordion--default .timeline-accordion__pill-toggle {
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
}

/* completed state */
.timeline-accordion--done .timeline-accordion__pill-toggle {
  background: linear-gradient(180deg, #ecfdf5, #dcfce7);
  color: #065f46;
  border: 1px solid #86efac;
}

/* Panel */
.timeline-accordion__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.25s ease;
  border-top: none;
  margin-top: -1px;
  border-radius: 0 0 12px 12px;
  padding: 0 10px;
}

/* Panel backgrounds/borders tied to parent state */
.timeline-accordion--default .timeline-accordion__panel {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.timeline-accordion--done .timeline-accordion__panel {
  background: linear-gradient(180deg, #ecfdf5, #dcfce7);
  border: 1px solid #86efac;
}

/* Chevron rotation when open */
.timeline-accordion__checkbox:checked + .timeline-accordion__pill-toggle .chev {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

/* Add padding when open */
.timeline-accordion__checkbox:checked ~ .timeline-accordion__panel {
  padding: 8px 10px;
}

/* List styles */
.timeline-accordion__list {
  list-style: none;
  margin: 8px 0 10px 0;
  padding: 0;
}

.timeline-accordion__list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 2px;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.timeline-accordion--default .timeline-accordion__list > li {
  border-top: 1px solid #e5e7eb;
}

.timeline-accordion--done .timeline-accordion__list > li {
  border-top: 1px solid #bbf7d0;
}

.timeline-accordion__list > li:first-child {
  border-top: none;
}

.timeline-accordion__list > li span:first-child {
  color: #334155;
  font-weight: 700;
}

.timeline-accordion__list > li span:last-child {
  color: #0f172a;
  font-weight: 800;
}

/* Staggered reveal */
.timeline-accordion__checkbox:checked
  ~ .timeline-accordion__panel
  .timeline-accordion__list
  > li {
  opacity: 1;
  transform: translateY(0);
}

.timeline-accordion__list > li:nth-child(1) {
  transition-delay: 0.04s;
}

.timeline-accordion__list > li:nth-child(2) {
  transition-delay: 0.08s;
}

.timeline-accordion__list > li:nth-child(3) {
  transition-delay: 0.12s;
}

.timeline-accordion__list > li:nth-child(4) {
  transition-delay: 0.16s;
}

.timeline-accordion__list > li:nth-child(5) {
  transition-delay: 0.2s;
}


.req-subscribe-btn {
  flex: 0 0 auto;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--c-primary);
  color: #fff;
}

.req-subscribe-btn:hover {
  background: var(--c-primary-hover);
}


/* Hide legend on screens smaller than 768px (standard mobile/tablet breakpoint) */
@media (max-width: 767px) {
  .map-legend {
    display: none !important;
  }
}

/* Your existing styles (modified slightly for consistency) */
.map-legend {
  background: white;
  padding: 6px 10px;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  margin-bottom: 12px !important;
  margin-right: 12px !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.legend-container {
  display: flex;
  align-items: center;
  gap: 12px; 
}

.legend-content h4 {
  margin: 0 0 4px 0;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 3px;
  white-space: nowrap;
}

.legend-row:last-child { margin-bottom: 0; }

.legend-logo {
  padding-left: 10px;
  border-left: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
}

.legend-logo img {
  height: 32px; 
  width: auto;
  display: block;
}

/* Symbols */
.sym-line { width: 14px; height: 3px; border-radius: 1px; background: #0076cd; }

.sym-hex { 
  width: 14px; 
  height: 12px; 
  background: #258dfe; 
  opacity: 0.4;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.sym-dot { 
  width: 9px; 
  height: 9px; 
  border-radius: 50%; 
  background: #f8931d; 
  border: 1px solid white; 
  box-shadow: 0 0 0 1px #f8931d; 
}