/* urbanXplorer weather UI */
.weather-widget {
  position: fixed;
  right: 16px;
  left: auto;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 1010;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  font-family: var(--font-family);
}

.weather-indicator {
  pointer-events: auto;
  min-width: 74px;
  height: 46px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 22px rgba(15,23,42,.14);
  color: #0F172A;
  font: 700 15px/1 var(--font-family);
  cursor: pointer;
}

.weather-widget.weather-card-open .weather-indicator { display: none; }
.weather-indicator-icon { font-size: 25px; line-height: 1; }

.weather-card {
  pointer-events: auto;
  width: min(360px, calc(100vw - 28px));
  max-height: min(68dvh, 560px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 18px 48px rgba(15,23,42,.20);
  color: #0F172A;
  font-family: var(--font-family);
}

.weather-card *,
.weather-card button { font-family: var(--font-family); }
.weather-card[hidden] { display: none !important; }

.weather-card-header,
.weather-card-current,
.weather-card-metrics,
.weather-card-actions {
  display: flex;
  align-items: center;
}

.weather-card-header { justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.weather-card-title { min-width: 0; }
.weather-card-location { font-size: 14px; font-weight: 700; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather-card-updated { margin-top: 2px; font-size: 10px; color: #94A3B8; }
.weather-card-close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #F1F5F9; font-size: 20px; color: #475569; cursor: pointer; }

.weather-card-current { gap: 12px; }
.weather-card-current-icon { font-size: 48px; line-height: 1; }
.weather-card-temperature { font-size: 38px; font-weight: 700; letter-spacing: -.04em; }
.weather-card-condition { font-size: 13px; color: #64748B; }

.weather-card-metrics { margin-top: 14px; gap: 8px; flex-wrap: wrap; }
.weather-card-metric { flex: 1 1 96px; padding: 10px; border-radius: 14px; background: #F8FAFC; }
.weather-card-metric-label { display: block; font-size: 10px; color: #94A3B8; text-transform: uppercase; letter-spacing: .04em; }
.weather-card-metric-value { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; color: #334155; }

.weather-card-section { margin-top: 15px; }
.weather-card-section-title { margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #334155; }
.weather-hourly { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.weather-hourly::-webkit-scrollbar { display: none; }
.weather-hour { flex: 0 0 64px; padding: 8px 6px; border-radius: 14px; background: #F8FAFC; text-align: center; }
.weather-hour-time { font-size: 10px; color: #64748B; }
.weather-hour-icon { margin: 4px 0; font-size: 22px; }
.weather-hour-temp { font-size: 12px; font-weight: 700; }

.weather-daily { display: grid; gap: 6px; }
.weather-day { display: grid; grid-template-columns: 64px 28px 1fr auto; gap: 8px; align-items: center; padding: 8px 4px; border-bottom: 1px solid rgba(51,65,85,.08); font-size: 12px; }
.weather-day-name { font-weight: 700; }
.weather-day-range { color: #64748B; }
.weather-day-rain { color: #0D9488; font-weight: 600; }

.weather-card-actions { margin-top: 14px; gap: 8px; }
.weather-card-button { min-height: 40px; padding: 0 13px; border: 1px solid rgba(13,148,136,.18); border-radius: 999px; background: rgba(13,148,136,.08); color: #0F766E; font: 700 12px/1 var(--font-family); cursor: pointer; }
.weather-location-search { margin-top: 10px; }
.weather-location-search[hidden] { display: none !important; }
.weather-location-search gmp-place-autocomplete { display: block; width: 100%; }
.weather-card-error { margin-top: 10px; color: #B91C1C; font-size: 12px; }

/* Search belongs to the upper-right search surface; weather takes its former lower-right slot. */
.header-glass { padding-right: 56px; }
.map-search-trigger {
  position: fixed !important;
  top: calc(env(safe-area-inset-top) + 12px) !important;
  right: 12px !important;
  bottom: auto !important;
  z-index: 1801 !important;
}
.map-search-panel {
  top: calc(env(safe-area-inset-top) + 12px) !important;
  right: 64px !important;
  bottom: auto !important;
  z-index: 1800 !important;
}
.map-controls {
  bottom: calc(76px + env(safe-area-inset-bottom)) !important;
}

@media (max-width:700px) {
  .map-search-panel:not([hidden]) {
    top: calc(env(safe-area-inset-top) + 12px) !important;
    left: 12px !important;
    right: 12px !important;
    bottom: auto !important;
    width: auto !important;
  }
}

@media (max-width:600px) {
  .weather-widget { right: 12px; left: auto; bottom: calc(20px + env(safe-area-inset-bottom)); }
  .weather-card { width: calc(100vw - 24px); }
}
