/* SafePath AetherMap Taiwan HUD - 局部動態特效與既有組件 CSS 樣式 */

@keyframes dash-flow {
  to {
    stroke-dashoffset: -32;
  }
}

.animate-dash-flow {
  animation: dash-flow 1.6s linear infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.15;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.pulse-node-ring {
  animation: pulse-ring 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

/* 隱藏滾動條 */
::-webkit-scrollbar {
  display: none;
}

/* MapLibre 畫布全覆蓋 */
#map-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.maplibregl-canvas {
  outline: none;
}

/* 徹底消除輸入框預設 outline 與 ring 邊框 */
input,
input:focus,
input:focus-visible,
input:active {
  outline: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  --tw-ring-color: transparent !important;
  --tw-ring-shadow: none !important;
  --tw-ring-offset-shadow: none !important;
}

/* 標題與副標題：白色字體 + 3px 黑色外框 */
.title-white-stroke-black {
  color: #ffffff !important;
  -webkit-text-stroke: 3px #000000;
  paint-order: stroke fill;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.85);
}

.subtitle-white-stroke-black {
  color: #ffffff !important;
  -webkit-text-stroke: 2.5px #000000;
  paint-order: stroke fill;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

/* Small screens: keep search suggestions legible and map tools out of the search path. */
@media (max-width: 480px) {
  #mainHeroConsole {
    width: calc(100vw - 24px);
    padding-inline: 0;
  }
  #greeting-title {
    max-width: 100%;
    white-space: normal;
    font-size: clamp(18px, 4.7vw, 22px);
    line-height: 1.3;
    -webkit-text-stroke: 1.2px #000;
  }
  #greeting-subtitle {
    max-width: 100%;
    font-size: 11px;
    line-height: 1.5;
    -webkit-text-stroke: 1px #000;
  }
  #map-right-action-toolbar {
    top: auto;
    bottom: 38px;
    right: 10px;
    left: 10px;
    transform: none;
    flex-direction: row;
    overflow-x: auto;
    max-width: calc(100vw - 20px);
    gap: 2px;
    padding: 4px;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  #map-right-action-toolbar nav,
  #map-right-action-toolbar > .flex {
    flex-direction: row;
  }
  #map-right-action-toolbar #right-nav-home-btn {
    width: 34px;
    height: 34px;
    margin-bottom: 0;
    flex-shrink: 0;
  }
  #map-right-action-toolbar nav > *,
  #map-right-action-toolbar > .flex > button {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  #map-right-action-toolbar > .w-6 {
    width: 1px;
    height: 24px;
    margin: 0 4px;
    flex-shrink: 0;
  }
  /* Keep attribution accessible, without colliding with the mobile tools. */
  #aetherMapConsoleWrapper > footer {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 86px;
    width: calc(100vw - 24px);
    padding: 4px 7px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    gap: 5px;
    font-size: 9px;
  }
  #aetherMapConsoleWrapper > footer > * {
    flex-shrink: 0;
  }
}
