@import url("/src/components/transitnexa/transit-map-overlay.css?v=20260501-geocode-1");

:root {
  color: #f7fbff;
  background: #07090d;
  font-family:
    Inter, "Noto Sans TC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}


* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

#app,
.tnx-map-shell {
  width: 100vw;
  height: 100vh;
}

#transit-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 460px;
  max-width: 100vw;
  z-index: 30;
  pointer-events: auto;
}

#transit-overlay .transit-search-panel,
#transit-overlay .transit-route-results,
#transit-overlay .transit-search-panel *,
#transit-overlay .transit-route-results * {
  pointer-events: auto;
}

.transit-current-route-summary {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: min(462px, calc(100vw - 560px));
  z-index: 2;
  display: grid;
  gap: 4px;
  max-width: 860px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(6, 10, 18, 0.76);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  color: #e5e7eb;
}

.transit-current-route-summary[hidden] {
  display: none;
}

.transit-current-route-summary strong {
  font-size: 15px;
}

.transit-current-route-summary span,
.transit-current-route-summary small {
  color: #94a3b8;
}

.transit-current-route-summary em {
  float: right;
  margin-left: 16px;
  color: rgba(148, 163, 184, 0.55);
  font-style: normal;
}

.tnx-map-shell {
  position: relative;
  overflow: hidden;
  background: #07090d;
}

.tnx-map {
  position: absolute;
  inset: 0;
}

.tnx-map-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(4, 6, 10, 0.82) 0%, rgba(4, 6, 10, 0.42) 34%, transparent 68%),
    linear-gradient(0deg, rgba(4, 6, 10, 0.55) 0%, transparent 34%);
}

.tnx-route-panel,
.tnx-status-bar,
.tnx-summary-bar,
.tnx-map-controls,
.tnx-bottom-tabs {
  position: absolute;
  z-index: 2;
}

.tnx-route-panel {
  left: 24px;
  top: 24px;
  bottom: 82px;
  width: min(410px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(10, 14, 20, 0.76);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(22px);
}

.tnx-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tnx-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(47, 140, 255, 0.42);
  border-radius: 14px;
  background: rgba(47, 140, 255, 0.16);
  color: #cfe6ff;
  font-weight: 800;
  letter-spacing: 0;
}

.tnx-brand-name {
  font-size: 20px;
  font-weight: 800;
}

.tnx-brand-subtitle {
  margin-top: 2px;
  color: rgba(226, 235, 245, 0.64);
  font-size: 12px;
}

.tnx-search-card,
.tnx-flow-card,
.tnx-total-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
}

.tnx-search-card {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 42px;
  gap: 12px;
  padding: 16px;
}

.tnx-stop-stack {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 22px 0;
}

.tnx-stop-dot {
  width: 12px;
  height: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 18px currentColor;
}

.tnx-stop-dot-origin {
  color: #35e783;
  background: #35e783;
}

.tnx-stop-dot-destination {
  color: #ff4d5e;
  background: #ff4d5e;
}

.tnx-stop-rail {
  width: 2px;
  min-height: 54px;
  background: linear-gradient(#35e783, #2f8cff, #ff4d5e);
  opacity: 0.52;
}

.tnx-input-stack {
  display: grid;
  gap: 10px;
}

.tnx-input-stack label {
  display: grid;
  gap: 6px;
}

.tnx-input-stack span {
  color: rgba(226, 235, 245, 0.6);
  font-size: 12px;
}

.tnx-input-stack input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  outline: none;
  background: rgba(4, 8, 14, 0.58);
  color: #ffffff;
}

.tnx-icon-button,
.tnx-query-actions button,
.tnx-plan-tabs button,
.tnx-total-card button,
.tnx-map-controls button,
.tnx-bottom-tabs button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.08);
}

.tnx-swap-button {
  align-self: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.tnx-query-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 10px;
}

.tnx-query-actions button {
  min-height: 42px;
  border-radius: 14px;
}

.tnx-query-actions .tnx-primary-action {
  border-color: rgba(47, 140, 255, 0.6);
  background: rgba(47, 140, 255, 0.9);
  box-shadow: 0 10px 28px rgba(47, 140, 255, 0.22);
}

.tnx-plan-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tnx-plan-tabs button {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 10px;
  border-radius: 18px;
  text-align: left;
}

.tnx-plan-tabs button.is-active {
  border-color: rgba(47, 140, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(47, 140, 255, 0.32), 0 12px 28px rgba(47, 140, 255, 0.16);
}

.tnx-plan-tabs span,
.tnx-plan-tabs em {
  color: rgba(226, 235, 245, 0.66);
  font-size: 12px;
  font-style: normal;
}

.tnx-plan-tabs strong {
  font-size: 17px;
}

.tnx-flow-card {
  display: grid;
  padding: 18px 16px;
}

.tnx-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 18px;
}

.tnx-flow-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 21px;
  bottom: -2px;
  width: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.tnx-flow-node {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #2f8cff;
  box-shadow: 0 0 18px rgba(47, 140, 255, 0.55);
}

.tnx-flow-step.is-walk .tnx-flow-node {
  background: #35e783;
  box-shadow: 0 0 18px rgba(53, 231, 131, 0.45);
}

.tnx-flow-step.is-stop .tnx-flow-node {
  background: #10151c;
}

.tnx-flow-step strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.tnx-flow-step small {
  color: rgba(226, 235, 245, 0.72);
  font-weight: 500;
}

.tnx-flow-step p {
  margin: 2px 0 0;
  color: rgba(226, 235, 245, 0.66);
  font-size: 13px;
}

.tnx-total-card {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}

.tnx-total-card div {
  display: grid;
  gap: 2px;
}

.tnx-total-card strong {
  font-size: 18px;
}

.tnx-total-card span {
  color: rgba(226, 235, 245, 0.58);
  font-size: 11px;
}

.tnx-total-card button {
  grid-column: 1 / -1;
  min-height: 40px;
  margin-top: 4px;
  border-radius: 14px;
}

.tnx-status-bar {
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.64);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
  color: rgba(240, 246, 255, 0.76);
}

.tnx-status-bar strong {
  color: #8fc4ff;
}

.tnx-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35e783;
  box-shadow: 0 0 16px rgba(53, 231, 131, 0.8);
}

.tnx-summary-bar {
  right: 104px;
  bottom: 24px;
  left: min(462px, calc(100vw - 460px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: rgba(10, 14, 20, 0.7);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.tnx-summary-bar div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.045);
}

.tnx-summary-bar span {
  color: rgba(226, 235, 245, 0.56);
  font-size: 12px;
}

.tnx-summary-bar strong {
  font-size: 16px;
}

.tnx-map-controls {
  right: 24px;
  bottom: 116px;
  display: grid;
  gap: 10px;
}

.tnx-map-controls button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(10, 14, 20, 0.72);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  font-size: 18px;
}

.tnx-bottom-tabs {
  left: 24px;
  bottom: 20px;
  display: flex;
  gap: 8px;
  max-width: calc(100vw - 48px);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.68);
  backdrop-filter: blur(18px);
}

.tnx-bottom-tabs button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: rgba(226, 235, 245, 0.68);
}

.tnx-bottom-tabs button.is-active {
  border-color: rgba(47, 140, 255, 0.55);
  background: rgba(47, 140, 255, 0.24);
  color: #ffffff;
}

.maplibregl-ctrl-attrib {
  border-radius: 10px;
  background: rgba(10, 14, 20, 0.58) !important;
  color: rgba(240, 246, 255, 0.72) !important;
  backdrop-filter: blur(12px);
}

.maplibregl-ctrl-attrib a {
  color: rgba(198, 224, 255, 0.86) !important;
}

.tnx-map-error {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  background: #07090d;
  color: #ffffff;
}

@media (max-width: 900px) {
  #transit-overlay {
    right: 0;
    width: auto;
  }

  body {
    overflow: hidden;
  }

  .tnx-map-vignette {
    background:
      linear-gradient(0deg, rgba(4, 6, 10, 0.86) 0%, rgba(4, 6, 10, 0.26) 48%, transparent 72%),
      linear-gradient(180deg, rgba(4, 6, 10, 0.44) 0%, transparent 30%);
  }

  .tnx-route-panel {
    top: auto;
    right: 12px;
    bottom: 74px;
    left: 12px;
    width: auto;
    max-height: 54vh;
    padding: 14px;
    border-radius: 24px 24px 18px 18px;
  }

  .tnx-brand-subtitle,
  .tnx-query-actions button:nth-child(2),
  .tnx-total-card {
    display: none;
  }

  .tnx-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 12px;
  }

  .tnx-brand-name {
    font-size: 17px;
  }

  .tnx-search-card {
    grid-template-columns: 18px minmax(0, 1fr) 40px;
    padding: 12px;
  }

  .tnx-query-actions {
    grid-template-columns: 1fr 1.35fr;
  }

  .tnx-plan-tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x mandatory;
  }

  .tnx-plan-tabs button {
    min-width: 152px;
    scroll-snap-align: start;
  }

  .tnx-flow-card {
    padding: 14px 12px;
  }

  .tnx-flow-step {
    padding-bottom: 14px;
  }

  .tnx-status-bar {
    top: 14px;
    right: 14px;
    left: 14px;
    justify-content: center;
    min-height: 38px;
    font-size: 12px;
  }

  .tnx-summary-bar {
    right: 12px;
    bottom: 12px;
    left: 12px;
    grid-template-columns: repeat(4, minmax(104px, 1fr));
    overflow-x: auto;
    border-radius: 16px;
  }

  .tnx-summary-bar div {
    padding: 10px 12px;
  }

  .tnx-summary-bar strong {
    font-size: 14px;
  }

  .tnx-map-controls {
    right: 12px;
    bottom: calc(54vh + 96px);
    gap: 8px;
  }

  .tnx-map-controls button {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .tnx-bottom-tabs {
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: none;
  }
}

@media (max-width: 520px) {
  .tnx-route-panel {
    max-height: 58vh;
  }

  .tnx-input-stack input {
    min-height: 38px;
  }

  .tnx-flow-step p {
    font-size: 12px;
  }

  .tnx-summary-bar {
    display: none;
  }

  .tnx-map-controls {
    bottom: calc(58vh + 88px);
  }
}
