/* Shared interaction and responsive refinements for the public Budfinder pages. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

:root {
  /*
   * Brand asset handoff: the upcoming logo can replace this single image
   * without changing lockup markup, spacing, or responsive layout.
   */
  --budfinder-brand-mark-image: url("../images/budfinder-badge-v3.png");
  --budfinder-brand-mark-size: 40px;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.budfinder-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--ink, #f4fff8);
  text-decoration: none;
}

.budfinder-brand-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: var(--budfinder-brand-mark-size);
  height: var(--budfinder-brand-mark-size);
  border-radius: 50%;
  background:
    var(--budfinder-brand-mark-image)
    center / contain
    no-repeat;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
}

.budfinder-brand-name {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.atmosphere {
  width: auto;
  max-width: 100%;
  overflow: clip;
  contain: layout paint;
}

@media (min-width: 700px) and (max-width: 900px) {
  .atmosphere-leaves,
  .smoke-plume {
    inset: 0 !important;
    animation: none !important;
    transform: none !important;
  }
}

:where(button, a, input, select, textarea):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, #4df49a) 72%, white);
  outline-offset: 3px;
}

:where(button, [role="button"]) {
  line-height: 1.2;
  text-wrap: balance;
  touch-action: manipulation;
}

:where(.app-mode-toggle, .actions, .button-row, .selection-actions) > * {
  min-width: 0;
}

.app-mode-toggle {
  max-width: calc(100vw - max(20px, env(safe-area-inset-left)) - max(20px, env(safe-area-inset-right)));
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.app-mode-toggle::-webkit-scrollbar {
  display: none;
}

.app-mode-toggle.app-mode-toggle :where(a, button) {
  box-sizing: border-box;
  flex: 0 1 auto;
  text-align: center;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.market-snapshot,
.release-status {
  content-visibility: auto;
  contain-intrinsic-size: 1px 620px;
}

@media (min-width: 768px) {
  .controls .controls-hide {
    display: none !important;
  }
}

@media (max-width: 680px) {
  :root {
    --budfinder-brand-mark-size: 36px;
  }

  .app-mode-toggle {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    overflow: visible;
  }

  .app-mode-toggle.app-mode-toggle :where(a, button) {
    width: 100%;
    min-height: 44px;
    padding-inline: clamp(4px, 2.6vw, 10px);
    font-size: clamp(11px, 3.5vw, 13px);
    white-space: normal;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .app-mode-toggle,
  .controls,
  .overlay-card,
  .home-search {
    backdrop-filter: none !important;
  }
}

@media (pointer: coarse) {
  :where(.chip-btn, .map-quick-chip, .quick-chips button) {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.has-site-settings-open {
  overflow: hidden;
}
