/* Shared responsive and accessibility corrections for standalone pages. */

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #c354e8;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .chat-nav {
    min-height: calc(56px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    padding-inline: max(0.7rem, env(safe-area-inset-left)) max(0.7rem, env(safe-area-inset-right));
  }

  .chat-nav__home,
  .chat-nav__link,
  .chat-nav__shutdown,
  .chat-container button {
    min-height: 44px;
  }

  .chat-nav__home {
    min-width: 44px;
    justify-content: center;
  }

  .chat-nav__shutdown,
  .chat-input-mic,
  .chat-input-submit {
    flex: 0 0 44px;
    width: 44px !important;
    min-width: 44px;
    height: 44px !important;
    min-height: 44px;
  }

  .chat-input-wrapper {
    padding-bottom: max(0.55rem, env(safe-area-inset-bottom));
  }

  .chat-input-actions {
    gap: 0.25rem;
  }

  .structured-intro-card__controls {
    grid-template-columns: 44px minmax(92px, 112px) 44px !important;
  }

  .structured-intro-card__nav {
    width: 44px !important;
    min-width: 44px;
    height: 44px !important;
    min-height: 44px;
  }

  .structured-intro-card__page,
  .structured-intro-card__primary,
  .survey-card button,
  .probing-skip-section button,
  .end-conversation-slot button {
    min-height: 44px !important;
  }

  .an-nav {
    min-height: calc(56px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
  }

  .an-nav__brand,
  .an-btn-secondary,
  .an-select {
    min-height: 44px;
  }

  .an-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .an-select {
    font-size: 1rem;
  }

  .an-gauge__labels,
  .hm-col-label,
  .hm-row-label,
  .hm-cell,
  .hm-legend__label {
    font-size: 0.7rem;
  }

  .hm-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .hm-col-labels,
  .hm-body,
  .hm-legend {
    min-width: 360px;
  }

  .thank-you-shell {
    min-height: 100dvh;
    height: auto;
    padding-top: max(1rem, env(safe-area-inset-top));
    padding-right: max(0.9rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    padding-left: max(0.9rem, env(safe-area-inset-left));
  }

  .thank-you-content {
    width: min(100%, 24rem);
  }

  .thank-you__title {
    max-width: 12ch;
    font-size: clamp(1.9rem, 9.4vw, 2.65rem);
    text-wrap: balance;
  }

  .thank-you__subtitle,
  .thank-you__description {
    width: min(100%, 34ch);
    max-width: 34ch;
    font-size: clamp(0.875rem, 3.8vw, 0.98rem);
  }

  .thank-you__button {
    min-height: 48px;
  }
}

@media (max-width: 768px) and (max-height: 540px) and (orientation: landscape) {
  .thank-you-shell {
    place-items: start center;
    overflow-y: auto;
  }

  .thank-you-content {
    padding-block: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
