
.topbar-responsive {
  background: #2c3840;
  padding: 1rem 1.5rem;
}

.topbar-responsive .topbar-responsive-logo {
  color: #fefefe;
  vertical-align: middle;
}

.version-badge {
  font-size: 0.75rem;
  color: #c6d1d8;
  margin-left: 0.5rem;
  font-weight: normal;
}

.topbar-responsive .menu {
  background: #2c3840;
}

.topbar-responsive .menu li:last-of-type {
  margin-right: 0;
}

.topbar-responsive .menu a {
  color: #fefefe;
  transition: color 0.15s ease-in;
}

.topbar-responsive .menu a:hover {
  color: #c6d1d8;
}

@media screen and (max-width: 39.9375em) {
  .topbar-responsive .menu a {
    padding: 0.875rem 0;
  }
}

.topbar-responsive .menu .topbar-responsive-button {
  color: #fefefe;
  border-color: #fefefe;
  border-radius: 5000px;
  transition: color 0.15s ease-in, border-color 0.15s ease-in;
}

.topbar-responsive .menu .topbar-responsive-button:hover {
  color: #c6d1d8;
  border-color: #c6d1d8;
}

@media screen and (max-width: 39.9375em) {
  .topbar-responsive .menu .topbar-responsive-button {
    width: 100%;
    margin: 0.875rem 0;
  }
}

/* Overflow ("⋮") menu — a Foundation Dropdown anchored to the last nav item. */
.topbar-responsive .overflow-menu {
  position: relative;
}

.topbar-responsive .overflow-menu-button {
  background: transparent;
  border: 0;
  color: #fefefe;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  margin: 0;
  padding: 0.5rem 0.75rem;
}

.topbar-responsive .overflow-menu-button:hover,
.topbar-responsive .overflow-menu-button:focus {
  color: #c6d1d8;
}

.topbar-responsive .overflow-menu-button:focus {
  outline: 2px solid #c6d1d8;
  outline-offset: 2px;
}

/* Match the dark top bar so the existing white .menu link colour stays legible. */
.topbar-responsive .overflow-menu-pane {
  width: auto;
  min-width: 12rem;
  padding: 0.5rem;
  background-color: #2c3840;
  border-color: #2c3840;
  z-index: 1000;
}

.topbar-responsive .overflow-menu-pane .menu {
  background: transparent;
}

.topbar-responsive .overflow-menu-pane .menu a {
  color: #fefefe;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.topbar-responsive .overflow-menu-pane .menu a:hover,
.topbar-responsive .overflow-menu-pane .menu a:focus {
  color: #c6d1d8;
}

@media screen and (max-width: 39.9375em) {
  .topbar-responsive {
    padding: 0.75rem;
  }
  .topbar-responsive .top-bar-title {
    position: relative;
    width: 100%;
  }
  .topbar-responsive .top-bar-title span {
    position: absolute;
    right: 0;
    border: 1px solid #fefefe;
    border-radius: 5px;
    padding: 0.25rem 0.45rem;
    top: 50%;
    -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
            transform: translateY(-50%);
  }
  .topbar-responsive .top-bar-title span .menu-icon {
    margin-bottom: 4px;
  }
  .version-badge {
    display: none;
  }
}

@-webkit-keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@-webkit-keyframes slideDown {
  0% {
    -webkit-transform: translateY(-100%);
            transform: translateY(-100%);
  }
  100% {
    -webkit-transform: translateY(0%);
            transform: translateY(0%);
  }
}

@keyframes slideDown {
  0% {
    -webkit-transform: translateY(-100%);
            transform: translateY(-100%);
  }
  100% {
    -webkit-transform: translateY(0%);
            transform: translateY(0%);
  }
}

@media screen and (max-width: 39.9375em) {
  .topbar-responsive-links {
    -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
    -webkit-animation-duration: 0.5s;
            animation-duration: 0.5s;
    width: 100%;
    -webkit-animation: fadeIn 1s ease-in;
            animation: fadeIn 1s ease-in;
  }
}

.speed-page {
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem 0;
}

.speedometer-container {
  text-align: center;
  margin-bottom: 1.5rem;
}

.speedometer-svg {
  width: 100%;
  max-width: 280px;
  height: auto;
}

.speed-label {
  font-size: 10px;
  fill: #666;
  font-family: sans-serif;
}

.speed-display {
  margin-top: -10px;
}

.speed-value {
  font-size: 4rem;
  font-weight: bold;
  color: #2c3840;
  line-height: 1;
}

.speed-unit {
  font-size: 1.5rem;
  color: #666;
  margin-left: 0.25rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.metric-card.full-width {
  grid-column: span 2;
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3840;
}

.status-message {
  text-align: center;
  font-size: 0.875rem;
  color: #888;
  padding: 0.5rem;
  border-radius: 4px;
  background: #f0f0f0;
}

.status-message.active {
  color: #4CAF50;
  background: #e8f5e9;
}

.status-message.error {
  color: #F44336;
  background: #ffebee;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  vertical-align: middle;
  margin-right: 8px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 28px;
  transition: background-color 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #4CAF50;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.tracking-status {
  font-size: 0.875rem;
  font-weight: 600;
  vertical-align: middle;
}

.tracking-status.on {
  color: #4CAF50;
}

.tracking-status.off {
  color: #888;
}

/* Shared ("everyone") map legend */
.shared-legend-entry {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.shared-legend-entry .toggle-switch {
  flex: 0 0 auto;
}

.shared-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  margin-right: 8px;
  flex: 0 0 auto;
}

/* Group view only: a stale (dimmed) person stays listed, just de-emphasised. */
.shared-legend-entry.stale {
  opacity: 0.55;
}

.shared-stale-badge {
  margin-left: 8px;
  padding: 1px 5px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #8a5300;
  background: #fff3cd;
  border-radius: 3px;
  flex: 0 0 auto;
}


