.pozari-tools,
.pozari-tools * {
  box-sizing: border-box;
}

:root {
  --pozari-support-bar-height: 0px;
}

:root.pozari-has-support-bar {
  --pozari-support-bar-height: 48px;
}

:root.pozari-has-support-bar body {
  padding-top: var(--pozari-support-bar-height);
}

:root.pozari-has-support-bar #root > .app-shell,
:root.pozari-has-support-bar #root > .h-screen {
  height: calc(100dvh - var(--pozari-support-bar-height));
}

.pozari-support-bar,
.pozari-support-bar * {
  box-sizing: border-box;
}

.pozari-support-bar {
  position: fixed;
  z-index: 3100;
  inset: 0 0 auto;
  /* Message and CTA travel together as one centred group. */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  height: var(--pozari-support-bar-height);
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 107, 53, 0.42);
  color: #cbd5e1;
  background:
    radial-gradient(circle at 22% 0%, rgba(255, 107, 53, 0.2), transparent 34%),
    rgba(10, 14, 20, 0.98);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
  backdrop-filter: blur(12px);
}

.pozari-support-bar-message {
  /* Wrap to a second line instead of cutting the sentence off. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
}

.pozari-support-bar-message strong {
  color: #fff7ed;
  font-weight: 800;
}

.pozari-support-bar-link {
  flex: none;
  padding: 9px 15px;
  border: 1px solid rgba(255, 107, 53, 0.64);
  border-radius: 999px;
  color: #fff7ed !important;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(234, 88, 12, 0.9));
  box-shadow: 0 5px 16px rgba(234, 88, 12, 0.22);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
  transition: filter 150ms ease, transform 150ms ease;
}

.pozari-support-bar-link:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.pozari-tools {
  --tools-bg: rgba(10, 14, 20, 0.96);
  --tools-border: #263549;
  --tools-muted: #94a3b8;
  --tools-text: #e2e8f0;
  --tools-orange: #ff6b35;
  position: fixed;
  inset: 0;
  /* Below the app's own popovers (2000) and modals (3000), above map chrome. */
  z-index: 1500;
  pointer-events: none;
  color: var(--tools-text);
  font-family: "SF Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;
}

.pozari-tools button,
.pozari-tools a {
  font-family: inherit;
}

/*
 * Consent re-opener. Kept narrow enough to sit in the column the app already
 * reserves for the desktop layer rail (`.map-bottom-chrome` in src/index.css),
 * so it never covers the status bar.
 */
.pozari-privacy-trigger {
  position: absolute;
  right: 14px;
  bottom: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  pointer-events: auto;
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: 10px;
  color: #94a3b8;
  background: rgba(17, 24, 32, 0.94);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.pozari-privacy-trigger:hover {
  color: var(--tools-text);
  border-color: rgba(148, 163, 184, 0.7);
}

.pozari-consent {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: min(430px, calc(100vw - 28px));
  padding: 16px;
  pointer-events: auto;
  border: 1px solid var(--tools-border);
  border-radius: 14px;
  background: var(--tools-bg);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  animation: pozari-panel-in 180ms ease-out;
}

.pozari-consent-title {
  margin: 0;
  color: var(--tools-text);
  font-size: 13px;
}

.pozari-consent-copy {
  margin: 7px 0 0;
  color: var(--tools-muted);
  font-size: 11px;
  line-height: 1.55;
}

.pozari-consent-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
}

.pozari-consent-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(30, 42, 58, 0.55);
  font-size: 10px;
  cursor: pointer;
}

.pozari-consent-button:hover {
  border-color: rgba(148, 163, 184, 0.75);
  background: rgba(30, 42, 58, 0.85);
}

.pozari-consent-button.is-primary {
  border-color: rgba(255, 107, 53, 0.58);
  color: #ffb08f;
  background: rgba(255, 107, 53, 0.14);
}

.pozari-tools button:focus-visible,
.pozari-tools a:focus-visible {
  outline: 2px solid var(--tools-orange);
  outline-offset: 2px;
}

@keyframes pozari-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/*
 * Phones stack the status bar across the full width of the map, so
 * the bottom-right corner is taken. Dock the chip under the top bar instead,
 * opposite the map controls.
 */
@media (max-width: 767px) {
  .pozari-privacy-trigger {
    top: calc(2.75rem + env(safe-area-inset-top) + 0.6rem);
    bottom: auto;
    right: 0.75rem;
  }

  :root.pozari-has-support-bar .pozari-privacy-trigger {
    top: calc(var(--pozari-support-bar-height) + 2.75rem + 0.6rem);
  }
}

@media (max-width: 640px) {
  :root.pozari-has-support-bar {
    --pozari-support-bar-height: 58px;
  }

  .pozari-support-bar {
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px 0 10px;
  }

  .pozari-support-bar-message {
    -webkit-line-clamp: 3;
    font-size: 10.5px;
    line-height: 1.25;
  }

  .pozari-support-bar-link {
    padding: 9px 11px;
    font-size: 10.5px;
  }

  .pozari-consent-actions {
    justify-content: stretch;
  }

  .pozari-consent-button {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pozari-consent {
    animation: none;
  }

  .pozari-support-bar-link {
    transition: none;
  }
}
