/* Scoped fixes from the October 2026 usability review. */
:root { --pg-chat-clearance: 0px; }

/* Public shadow parts keep Typebot's launcher and panel above the purchase bar. */
typebot-bubble::part(button) {
  bottom: var(--pg-chat-clearance);
}
typebot-bubble::part(bot) {
  bottom: calc(100% + 12px + var(--pg-chat-clearance));
  max-height: calc(100dvh - 96px - var(--pg-chat-clearance));
}
.woot--bubble-holder { bottom: calc(20px + var(--pg-chat-clearance)) !important; }
@media (max-width: 640px) {
  /* The embed's 100vw panel otherwise extends under the browser scrollbar. */
  typebot-bubble::part(bot) { width: calc(100vw - 40px); right: 0; }
}
@media (max-width: 420px) {
  .pgfc-mobile-bar-main {
    display: grid;
    grid-template-columns: 44px minmax(72px, 1fr) auto;
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .pgfc-mobile-bar-main button { margin: 0; }
  .pgfc-mobile-bar-btn { padding: 12px; font-size: 14px; min-height: 48px; }
}

@media (max-width: 820px) {
  .pghv2-site-header-inner .pghv2-header-actions { max-width: none !important; gap: 6px !important; }
  .pghv2-site-header-inner .pghv2-header-actions .pghv2-account-link,
  .pghv2-site-header-inner .pghv2-header-actions .pghv2-cart-link {
    width: 44px !important;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }
}
@media (max-width: 1024px), (pointer: coarse) {
  body .pghv2-product-config-card .pgfc-help-btn,
  body .pghv2-product-config-card .pgfc-preview-segment-btn,
  body .pghv2-product-config-card .pgfc-preview-chip,
  .pgfc-mobile-bar-toggle,
  .pgfc-mobile-bar-summary-close {
    min-width: 44px;
    min-height: 44px;
  }
  .pghv2-product-config-card .pgfc-help-btn { width: 44px; height: 44px; }
  .pgfc-preview-label-row { flex-wrap: wrap; }
  .woot-widget-holder { bottom: var(--pg-chat-clearance) !important; max-height: calc(100dvh - var(--pg-chat-clearance)) !important; }
}

/* Keep the main desktop shopping action within a typical first screen. */
@media (min-width: 1024px) {
  .pghv2-hero-card { grid-template-columns: minmax(400px, 1fr) 1.15fr; padding: 28px 36px; }
  .pghv2-hero-copy h1 { max-width: 13ch; font-size: clamp(42px, 4vw, 60px); line-height: 1.02; letter-spacing: -0.035em; margin: 14px 0; }
  .pghv2-hero-description { max-width: 36ch; font-size: 18px; line-height: 1.45; margin-bottom: 14px; }
  .pghv2-hero-badges { gap: 10px 16px; margin: 14px 0 18px; }
}

.pgfc-preview-label[for] { display: block; margin: 0; cursor: pointer; }
.pghv2-product-config-card :is(input, select, textarea, button):focus-visible,
.pghv2-site-header :is(a, button, input):focus-visible,
.pgfc-mobile-bar button:focus-visible { outline: 2px solid #74d4ff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .pghv2-product-page *, .pghv2-hero-card * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  typebot-bubble::part(button), typebot-bubble::part(bot) { animation: none !important; transition: none !important; }
}
