.tracking-dashboard {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.tracking-dashboard .tracking-overview {
  margin-top: 0;
  padding: 20px;
}

.tracking-dashboard .tracking-overview-head strong {
  font-size: 15px;
}

.tracking-dashboard .track-status {
  background: #E0F2FE;
}

.tracking-dashboard .track-status.delivered {
  color: #0369A1;
  background: #E0F2FE;
}

.tracking-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid #edf0ef;
}

.tracking-facts > div {
  min-width: 0;
}

.tracking-facts small,
.tracking-facts strong {
  display: block;
}

.tracking-facts small,
.tracking-subhead small {
  color: #8b979d;
  font-size: 8px;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.tracking-facts strong {
  margin-top: 5px;
  color: #304956;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.route-map-card,
.tracking-people,
.tracking-history,
.support-chat {
  border: 1px solid #e4e9ec;
  background: #fff;
}

.route-map-card {
  padding: 17px;
}

.tracking-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tracking-subhead h3 {
  margin: 4px 0 0;
  color: #1d3646;
  font: 700 14px var(--font-display);
}

.manual-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  color: #0369A1;
  background: #E0F2FE;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.manual-tag svg {
  width: 12px;
  height: 12px;
}

.map-caption {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 16px;
  padding-top: 12px;
  color: #77858d;
  font-size: 9px;
}

.map-caption > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-caption strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: #314957;
  font-size: 9px;
}

.map-caption strong svg {
  width: 12px;
  height: 12px;
  color: #d64757;
}

.map-key {
  width: 17px;
  height: 0;
  border-top: 3px solid #ef4444;
}

.map-disclaimer {
  margin: 10px 0 0;
  color: #8b979d;
  font-size: 9px;
  line-height: 1.6;
}

.map-unavailable {
  min-height: 190px;
  margin-top: 13px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 20px;
  color: #77858d;
  background:
    linear-gradient(rgba(9, 38, 62, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(9, 38, 62, .03) 1px, transparent 1px),
    #f5f7f6;
  background-size: 28px 28px;
  text-align: center;
}

.map-unavailable > svg {
  width: 25px;
  height: 25px;
  color: #0369A1;
}

.map-unavailable p {
  margin: 11px 0 4px;
  color: #314957;
  font-size: 11px;
  font-weight: 700;
}

.map-unavailable small {
  font-size: 9px;
}

.tracking-people {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.tracking-people article {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  padding: 16px;
}

.tracking-people article + article {
  border-left: 1px solid #e9edef;
}

.party-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #0369A1;
  background: #E0F2FE;
}

.party-icon svg {
  width: 15px;
  height: 15px;
}

.tracking-people article > div {
  min-width: 0;
}

.tracking-people small,
.tracking-people strong {
  display: block;
}

.tracking-people small {
  color: #8b979d;
  font-size: 8px;
  letter-spacing: .7px;
}

.tracking-people strong {
  margin-top: 5px;
  color: #263f4d;
  font: 700 11px var(--font-display);
  overflow-wrap: anywhere;
}

.tracking-people p {
  margin: 6px 0 0;
  color: #77858d;
  font-size: 9px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tracking-history {
  padding: 17px;
}

.tracking-history .tracking-subhead {
  margin-bottom: 13px;
}

.tracking-history .track-event {
  padding-top: 11px;
}

.tracking-history .track-event b {
  font-size: 10px;
}

.tracking-history .track-event small {
  font-size: 9px;
}

.support-chat {
  overflow: hidden;
}

.support-chat-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 17px;
  color: #fff;
  background: #0F172A;
}

.support-chat-header > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-chat-header > i {
  width: 18px;
  color: #0EA5E9;
}

.support-chat-header strong,
.support-chat-header small {
  display: block;
}

.support-chat-header strong {
  font: 700 11px var(--font-display);
}

.support-chat-header small {
  margin-top: 4px;
  color: #bfccd1;
  font-size: 9px;
}

.support-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0EA5E9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .13);
}

.support-message-list {
  max-height: 300px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 14px 16px;
  background: #f7f9f8;
}

.support-message {
  width: min(88%, 470px);
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e6ebec;
  border-radius: 3px;
}

.support-message-client {
  align-self: flex-end;
  border-color: #BAE6FD;
  background: #E0F2FE;
}

.support-message > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.support-message strong {
  color: #304956;
  font-size: 9px;
}

.support-message time {
  color: #89969c;
  font-size: 8px;
}

.support-message p {
  margin: 7px 0 0;
  color: #465d69;
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-empty,
.support-loading,
.support-load-error {
  margin: auto;
  color: #839098;
  font-size: 10px;
  text-align: center;
}

.support-load-error,
.support-form-error {
  color: #a34336;
}

.support-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e8edef;
}

.support-form input,
.support-form textarea,
.support-admin-form textarea {
  width: 100%;
  border: 1px solid #dfe5e6;
  border-radius: 2px;
  padding: 9px 10px;
  outline: 0;
  background: #fff;
  color: #172b3b;
  font: 10px var(--font-body);
}

.support-form input:focus,
.support-form textarea:focus,
.support-admin-form textarea:focus {
  border-color: #0284C7;
}

.support-form input,
.support-form textarea {
  grid-column: 1 / -1;
}

.support-form textarea,
.support-admin-form textarea {
  min-height: 58px;
  resize: vertical;
}

.support-form .button,
.support-admin-form .button {
  min-height: 36px;
  justify-self: end;
  font-size: 9px;
}

.support-form-error {
  align-self: center;
  font-size: 9px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.support-admin-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #74828a;
  font-size: 10px;
}

.support-admin-note svg {
  width: 15px;
  height: 15px;
  color: #0369A1;
}

.support-admin-panel {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(230px, .75fr) minmax(0, 1.5fr);
  background: #fff;
  border: 1px solid #e7ebed;
}

.support-thread-list {
  border-right: 1px solid #e7ebed;
  overflow-y: auto;
}

.support-thread-button {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 0;
  border-bottom: 1px solid #edf0f1;
  background: #fff;
  text-align: left;
}

.support-thread-button:hover,
.support-thread-button.active {
  background: #E0F2FE;
}

.support-thread-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.support-thread-top strong {
  color: #17364a;
  font: 700 10px var(--font-display);
}

.support-thread-button time {
  color: #96a1a7;
  font-size: 8px;
}

.support-thread-preview {
  overflow: hidden;
  color: #77858d;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-thread-customer {
  color: #99a4a9;
  font-size: 8px;
}

.support-unread-count {
  min-width: 18px;
  padding: 3px 5px;
  border-radius: 12px;
  color: #fff;
  background: #d84c5a;
  font-size: 8px;
  text-align: center;
}

.support-empty-admin {
  padding: 22px;
  color: #89969c;
  font-size: 10px;
  text-align: center;
}

.support-admin-conversation {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.support-admin-thread-head {
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f1;
}

.support-admin-thread-head strong {
  color: #17364a;
  font: 700 11px var(--font-display);
}

.support-admin-thread-head small {
  color: #849097;
  font-size: 9px;
}

.support-admin-messages {
  max-height: 420px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
  background: #f7f9f8;
}

.support-admin-form {
  display: grid;
  gap: 8px;
  padding: 13px;
  border-top: 1px solid #e8edef;
}

.support-admin-form textarea {
  font-size: 10px;
}

.leaflet-map {
  width: 100%;
  height: clamp(280px, 43vw, 430px);
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid #dfe5e6;
  border-radius: 4px;
  background: #e8edf0;
}

.map-heading {
  align-items: flex-end;
}

.map-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  border: 1px solid #e4e9ec;
  border-radius: 4px;
  background: #f6f8f8;
}

.map-view-switch button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 3px;
  color: #64737b;
  background: transparent;
  font: 600 9px var(--font-body);
}

.map-view-switch button[aria-pressed="true"] {
  color: #fff;
  background: #0369A1;
}

.leaflet-map .leaflet-control-attribution {
  font-size: 8px;
}

.tracking-car-marker {
  border: 0;
  background: transparent;
}

.tracking-car-glow,
.tracking-car-symbol {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.tracking-car-glow {
  inset: 3px;
  background: rgba(239, 68, 68, .28);
  animation: car-pulse 1.35s ease-out infinite;
}

.tracking-car-symbol {
  inset: 7px;
  border: 2px solid #fff;
  background: #dc2626;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .35);
  font-size: 19px;
  line-height: 1;
}

@keyframes car-pulse {
  0% { opacity: .8; transform: scale(.78); }
  70%, 100% { opacity: 0; transform: scale(1.45); }
}

.map-key-progress {
  border-color: #ef4444;
}

.map-key-remaining {
  border-top: 3px solid #f59e0b;
}

.map-route-message {
  margin-top: 8px;
  color: #72818a;
  font-size: 9px;
  line-height: 1.5;
}

.map-route-message:empty {
  display: none;
}

.map-load-error {
  display: grid;
  height: 100%;
  place-items: center;
  margin: 0;
  padding: 20px;
  color: #8b3c32;
  background: #fff1ef;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 700px) {
  .route-map-card {
    padding: 12px;
  }

  .leaflet-map {
    height: 320px;
  }

  .map-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-view-switch {
    width: 100%;
  }

  .map-view-switch button {
    flex: 1 1 0;
    padding: 0 7px;
  }

  .tracking-dashboard,
  .route-map-card,
  .tracking-history,
  .support-chat {
    min-width: 0;
  }

  .tracking-dashboard .tracking-overview {
    padding: 16px;
  }

  .tracking-overview-head {
    flex-wrap: wrap;
  }

  .tracking-facts {
    grid-template-columns: 1fr 1fr;
    row-gap: 13px;
  }

  .tracking-people {
    grid-template-columns: 1fr;
  }

  .tracking-people article + article {
    border-left: 0;
    border-top: 1px solid #e9edef;
  }

  .map-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-caption strong {
    margin-left: 0;
  }

  .support-form {
    grid-template-columns: 1fr;
  }

  .support-form .button {
    justify-self: stretch;
  }

  .support-admin-panel {
    grid-template-columns: 1fr;
  }

  .support-thread-list {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid #e7ebed;
  }

  .support-admin-messages {
    min-height: 220px;
  }

  .support-message {
    width: min(96%, 470px);
  }
}
