* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #0f1115;
  color: #e8eaed;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

header {
  flex: 0 1 auto;
  max-height: min(48vh, 420px);
  overflow-y: auto;
  padding: 0.75rem 1rem;
  background: #1a1d24;
  border-bottom: 1px solid #2a2f3a;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

button,
input[type="text"] {
  font: inherit;
  border-radius: 6px;
  border: 1px solid #3a4254;
  background: #252a35;
  color: inherit;
  padding: 0.4rem 0.75rem;
}

button {
  cursor: pointer;
}

button.primary {
  background: #2d6cdf;
  border-color: #2d6cdf;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.setup-watch-links {
  flex: 0 0 auto;
  padding: 0.6rem 1rem;
  background: #141820;
  border-bottom: 1px solid #2a2f3a;
}

.setup-watch-links__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.setup-watch-links__label {
  color: #9aa3b2;
  font-weight: 600;
}

.setup-watch-links__code {
  word-break: break-all;
  color: #e8eaed;
}

.setup-watch-links__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.setup-watch-links__btn {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: #2d6cdf;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.setup-watch-links__btn--strip {
  background: #3a7a4d;
}

#map {
  flex: 1 1 auto;
  min-height: 200px;
  width: 100%;
  z-index: 0;
}

.status {
  font-size: 0.85rem;
  color: #9aa3b2;
}

.status.ok {
  color: #6dd58c;
}

.status.warn {
  color: #e8b86d;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.panel label {
  font-size: 0.75rem;
  color: #9aa3b2;
}

.panel--route-addresses {
  min-width: 12rem;
  flex: 1 1 12rem;
  max-width: 22rem;
}

.panel--route-addresses input[type="text"] {
  width: 100%;
}

.panel--route-addresses button {
  margin-top: 0.25rem;
  align-self: flex-start;
}

.setup-location-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.15rem 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.setup-location-option input {
  margin: 0;
}

.label-hint {
  font-weight: 400;
  color: #9aa3b2;
  font-size: 0.8em;
}

.panel--route-addresses input:disabled {
  opacity: 0.55;
}

.setup-write-key-panel {
  display: none;
}

body.setup-show-write-key .setup-write-key-panel {
  display: flex;
}

a {
  color: #7eb6ff;
}

.watch-badge {
  background: #3d1f1f;
  color: #ff8a8a;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}
