@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --brand-blue: #1e96dc;
  --text: #212121;
  --muted: #999;
  --surface: #fff;
  --shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body,
.location-sharing-app {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--text);
  font-family: Roboto, Arial, sans-serif;
  background: #ddd;
}

.location-sharing-app {
  isolation: isolate;
}

.location-sharing-map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.leaflet-container {
  width: 100%;
  height: 100%;
  background: #e5e5e5;
  font-family: Roboto, Arial, sans-serif;
}

.leaflet-control-attribution {
  margin: 0 !important;
  padding: 0 5px !important;
  color: #333;
  background: rgba(255, 255, 255, 0.8) !important;
  font-size: 10px;
  line-height: 18px;
}

.leaflet-control-attribution a {
  color: #0078a8;
}

.material-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Material Icons";
  font-size: 20px;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
}

@font-face {
  font-family: "Material Icons";
  font-style: normal;
  font-weight: 400;
  src: local("Material Icons"), local("MaterialIcons"), url("https://fonts.gstatic.com/s/materialicons/v143/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2") format("woff2");
}

.lifetime-card {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: min(329px, calc(100vw - 48px));
  max-width: 329px;
  padding: 20px 24px;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.16);
}

.lifetime-card > .material-icon {
  color: var(--muted);
  font-size: 21px;
}

.lifetime-card__text {
  margin: 0;
  padding: 0;
  color: rgba(0, 0, 0, 0.9);
  font-size: 14px;
  line-height: 17px;
}

.lifetime-card__title {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 14px;
}

.cards-carousel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 19px 24px;
}

.cards-carousel__button {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #666;
  background: #fff;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.cards-carousel__button:disabled {
  color: #ccc;
  cursor: default;
}

.tracker-card {
  width: min(100%, 370px);
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.tracker-card__header {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.tracker-card__title {
  min-width: 0;
  overflow: hidden;
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracker-card__toggle-icon {
  margin-left: 12px;
  color: #777;
  font-size: 22px;
  transition: transform 160ms ease;
}

.tracker-card__header[aria-expanded="true"] .tracker-card__toggle-icon {
  transform: rotate(180deg);
}

.tracker-card__body {
  padding: 0 16px 16px;
  border-top: 1px solid #eeeeee;
  color: #333;
  font-size: 14px;
  line-height: 18px;
}

.tracker-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}

.tracker-card__row .material-icon {
  color: #999;
  font-size: 17px;
}

.tracker-marker {
  position: relative;
  width: 36px;
  height: 42px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.4));
}

.tracker-marker__shape {
  position: absolute;
  top: 0;
  left: 3px;
  width: 30px;
  height: 34px;
  border: 2px solid var(--brand-blue);
  border-radius: 16px 16px 16px 3px;
  background: #fff;
  transform: rotate(-45deg);
}

.tracker-marker__dot {
  position: absolute;
  top: 10px;
  left: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-blue);
}

.tracker-marker-card {
  position: relative;
  width: 0;
  height: 0;
}

.tracker-marker-card__inner {
  position: absolute;
  top: -21px;
  left: 32px;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: min(300px, calc(100vw - 90px));
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  color: #212121;
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
}

.tracker-marker-wrapper {
  position: absolute;
  width: 36px;
  height: 42px;
  border: 0;
  background: transparent;
  pointer-events: none;
}

@media screen and (max-width: 560px) {
  .lifetime-card {
    top: max(16px, env(safe-area-inset-top));
    left: 16px;
    width: calc(100vw - 32px);
    max-width: none;
    padding: 16px 18px;
  }

  .cards-carousel {
    margin: 0 16px max(16px, env(safe-area-inset-bottom));
  }

  .cards-carousel__button {
    display: none;
  }

  .tracker-card {
    width: 100%;
  }

  .tracker-marker-card__inner {
    left: 24px;
    max-width: calc(100vw - 70px);
  }
}

@media screen and (max-height: 540px) and (orientation: landscape) {
  .lifetime-card {
    top: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .cards-carousel {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tracker-card__toggle-icon {
    transition: none;
  }
}
