.toasts {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--color-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  max-width: 320px;
}

.toast-error {
  border-left-color: var(--color-danger);
}

.toast-success {
  border-left-color: #10b981;
}

.toast-action {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.btn-avatar {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  /* The strong shade, as for .btn-primary: white on --color-primary is 3.1:1. */
  background: var(--color-primary-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.btn-avatar:hover:not(:disabled) {
  background: var(--color-primary-strong-hover);
}

.map-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Mobile only: the list screen's way to the off-screen map. */
.mobile-map-fab {
  display: none;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-text);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.mobile-map-fab svg {
  width: 24px;
  height: 24px;
}

.app-layout.map-expanded .sidebar,
.app-layout.map-expanded .detail-panel {
  display: none;
}

.tour-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ui/i18n.js removes this class once translated; visibility keeps the layout measurable. */
body.i18n-loading .navbar,
body.i18n-loading .app-layout {
  visibility: hidden;
}

body:not(.i18n-loading) .app-skeleton {
  display: none;
}

.app-skeleton {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
}

.skeleton-block {
  background: var(--color-surface-2);
  border-radius: 6px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.skeleton-navbar {
  height: var(--navbar-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border);
}

.skeleton-navbar-logo {
  width: 120px;
  height: 20px;
}

.skeleton-navbar-action {
  width: 84px;
  height: 34px;
}

.skeleton-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.skeleton-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton-line {
  width: 50%;
  height: 18px;
}

.skeleton-row {
  height: 52px;
}

.skeleton-map {
  flex: 1;
  border-radius: 0;
}

@media (max-width: 768px) {
  .skeleton-body {
    flex-direction: column;
  }

  .skeleton-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .skeleton-map {
    display: none;
  }
}
