/* Notices: base, responsive and interaction states. */
#toast, .toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #292d25;
  color: white;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 100;
}

#toast.show, .toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.local-info {
  position: relative;
  flex-shrink: 0;
}

.local-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(290px, calc(100vw - 44px));
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--popover);
  box-shadow: 0 8px 30px #25262220;
  z-index: 30;
  font-size: 14px;
  white-space: normal;
}

.local-tooltip p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 700px) {
  #toast, .toast {
    bottom: 153px;
    max-width: calc(100% - 44px);
    text-align: center;
  }
}

.app-update-notice {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 4px 20px #0002;
  font-size: 14px;
}

.app-update-notice button {
  font-size: inherit;
}

.in-app-browser-notice {
  margin-bottom: 28px;
}

.in-app-browser-notice p {
  margin-top: 12px;
}

.in-app-browser-notice button {
  margin-top: 16px;
}

#browserLinkFallback {
  margin-top: 14px;
}

#browserLinkFallback[hidden] {
  display: none;
}

.browser-help {
  margin-bottom: 28px;
}

.browser-help summary {
  cursor: pointer;
  font-size: 14px;
}

.browser-help[open] > .browser-notice-heading {
  margin-top: 18px;
}

.browser-help p {
  margin-top: 12px;
}

.browser-help button {
  margin-top: 16px;
}

.browser-notice-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.browser-app-icons {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.browser-app-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #fff;
}

.browser-app-icon svg {
  width: 26px;
  height: 26px;
}

.strava-app-icon {
  background: #fc5200;
}

.strava-app-icon svg {
  width: 19px;
  height: 27px;
}

.instagram-app-icon {
  background: linear-gradient(135deg, #833ab4, #e1306c, #f77737);
}

@media(max-width:380px) {
  .browser-notice-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.generic-app-icon {
  background: var(--accent);
}

@media (max-width:700px) {
  #toast,.toast {
    bottom: calc(180px + env(safe-area-inset-bottom,0px));
  }
}

.local-tooltip::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}
