/* ============================================================
   ROUTEONE — GOOGLE MAPS, SETUP, AND SMART POI STYLES
   ============================================================ */

/* Google Places prediction inputs and the single app-owned results surface. */
.origin-place-input { padding-right: 4.75rem; }
.destination-place-input { padding-right: 2.75rem; }
.location-input.is-resolving { opacity: .78; }

.location-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: calc(16px + .75rem);
  right: 0;
  z-index: 350;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  background: var(--bg-raised);
  box-shadow: var(--shadow-lg);
  animation: fadeInDown .18s var(--ease) both;
}

.google-suggestion-list {
  max-height: min(45dvh, 310px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--text-3) transparent;
  scrollbar-width: thin;
}

.google-suggestion-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 70px;
  padding: .75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: inherit;
  background: var(--bg-raised);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast);
}

.google-suggestion-item:hover,
.google-suggestion-item.active {
  background: var(--glass-hover);
}

.google-suggestion-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-1);
  background: #374151;
  font-size: 1.15rem;
}

.google-suggestion-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.google-suggestion-copy strong,
.google-suggestion-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.google-suggestion-copy strong {
  color: var(--text-1);
  font-size: .875rem;
  font-weight: 600;
}

.google-suggestion-copy small {
  color: var(--text-3);
  font-size: .75rem;
}

.google-maps-attribution {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .75rem;
  min-height: 48px;
  padding: .625rem 1rem;
  color: var(--text-1);
  background: var(--bg-raised);
  font-size: 1rem;
  font-weight: 600;
}

.google-maps-attribution span:last-child {
  color: var(--text-2);
  font-size: .85rem;
}

.google-suggestion-status {
  padding: 1rem;
  color: var(--text-2);
  font-size: .8rem;
  text-align: center;
}

#origin-gps-btn { right: .5rem; }
#origin-pick-btn { right: 2.35rem; }

.google-endpoint-marker {
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
}

.google-endpoint-marker.origin {
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #10b981;
}

.endpoint-origin-core {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

.google-endpoint-marker.destination {
  width: 32px;
  height: 42px;
  border-radius: 18px 18px 18px 3px;
  background: #ef4444;
  border: 2px solid rgba(255, 255, 255, .85);
  transform: rotate(-45deg);
}

.endpoint-destination-core {
  color: #fff;
  font-size: 15px;
  transform: rotate(45deg);
}

.google-poi-marker {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 50% 50% 50% 8px;
  color: #fff;
  background: #2563eb;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  font-size: 17px;
  cursor: pointer;
  transform: rotate(-45deg);
  transition: transform .18s ease, box-shadow .18s ease;
}

.google-poi-marker::first-letter { transform: rotate(45deg); }
.google-poi-marker:hover { transform: rotate(-45deg) scale(1.12); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }

.google-stop-marker {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  color: #fff;
  background: #f59e0b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  font-size: 19px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4));
}

.google-info-card {
  display: grid;
  gap: 5px;
  min-width: 200px;
  padding: 3px 2px;
  color: var(--text-1);
  font-family: Inter, sans-serif;
}

.google-info-card strong { font-size: .88rem; }
.google-info-card span { font-size: .74rem; line-height: 1.4; }
.google-info-card small { color: var(--text-2); font-size: .68rem; }

.google-info-stop-btn {
  margin-top: 5px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #2563eb;
  font: 700 .7rem/1 Inter, sans-serif;
  cursor: pointer;
}

.google-info-stop-btn:hover { filter: brightness(1.08); }

.poi-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: #1f2937;
  box-shadow: inset 0 1px rgba(255, 255, 255, .03);
}

.poi-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.poi-nav-close {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(245, 158, 11, .5);
  border-radius: 9px;
  background: #2a3445;
  color: #fbbf24;
  font: inherit;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
}
.poi-nav-close:hover { background: #374151; }
.rain-stops-open .poi-google-badge { display: none; }

.poi-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #9ca3af;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.poi-panel h3 { margin: 0; color: #f9fafb; font-size: .85rem; line-height: 1.3; }
.poi-panel-sub { margin: 7px 0 10px; color: #9ca3af; font-size: .66rem; line-height: 1.45; }

.poi-google-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  color: #94a3b8;
  background: #1e293b;
  font-size: .54rem;
  font-weight: 700;
}

.poi-cards { display: grid; gap: 7px; }

.poi-active-stop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(245, 158, 11, .38);
  border-radius: 10px;
  background: rgba(245, 158, 11, .1);
}

.poi-active-stop > div { min-width: 0; display: grid; gap: 2px; }
.poi-active-stop span { color: #fbbf24; font-size: .52rem; font-weight: 800; letter-spacing: .12em; }
.poi-active-stop strong { overflow: hidden; color: #fff7ed; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.poi-active-stop button {
  padding: 5px 7px;
  border: 1px solid rgba(251, 191, 36, .32);
  border-radius: 7px;
  color: #fde68a;
  background: rgba(120, 53, 15, .36);
  font-size: .56rem;
  font-weight: 700;
  cursor: pointer;
}

.poi-card {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: #1f2937;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.poi-card:hover,
.poi-card:focus-visible {
  border-color: rgba(37, 99, 235, .5);
  background: #2d3748;
  transform: translateY(-1px);
  outline: none;
}

.poi-card-top { display: flex; align-items: center; gap: 9px; }
.poi-card-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #1e293b; font-size: 15px; }
.poi-card-top > div { min-width: 0; display: grid; gap: 2px; }
.poi-card strong { overflow: hidden; color: #f9fafb; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.poi-card small { overflow: hidden; color: #9ca3af; font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }
.poi-card p { margin: 7px 0; color: #9ca3af; font-size: .62rem; line-height: 1.45; }

.poi-progress { overflow: hidden; height: 3px; border-radius: 999px; background: rgba(148, 163, 184, .15); }
.poi-progress span { display: block; height: 100%; border-radius: inherit; background: #2563eb; }
.poi-card-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.poi-add-stop-btn {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 7px;
  color: #f9fafb;
  background: #1f2937;
  font-size: .58rem;
  font-weight: 750;
  cursor: pointer;
}
.poi-add-stop-btn:hover { border-color: rgba(37, 99, 235, .5); background: #2d3748; }
.poi-add-stop-btn:disabled { color: #86efac; border-color: rgba(34, 197, 94, .28); background: rgba(22, 163, 74, .12); cursor: default; }
.poi-loading { padding: 10px 4px; color: #94a3b8; font-size: .64rem; line-height: 1.45; text-align: center; }

.startup-error-backdrop {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 15, 29, .82);
  backdrop-filter: blur(14px);
}

.startup-error-card {
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  color: #f9fafb;
  background: #111827;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .55);
  font-family: Inter, sans-serif;
}

.startup-error-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 13px;
  color: #fff;
  background: #f59e0b;
  font-size: 1.15rem;
  font-weight: 900;
}

.startup-error-card h2 { margin: 0 0 8px; color: #f9fafb; font-size: 1.15rem; }
.startup-error-card > p { margin: 0 0 18px; color: #9ca3af; font-size: .74rem; line-height: 1.55; }
.startup-error-retry {
  float: right;
  padding: 9px 13px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: #2563eb;
  font-size: .7rem;
  font-weight: 750;
  cursor: pointer;
}

@media (max-width: 560px) {
  .startup-error-card { padding: 21px; border-radius: 18px; }
  .poi-google-badge { display: none; }
}
