/* ============================================================================
   #1050 Storefront review 3, 4, 5 (owner 11-29, "Do all of these please").
   Phones only. Desktop keeps the footer, chat button and login page it had.
   Loaded by layouts/storefront.blade.php right after the main bundle.
   Standalone file (not in the Vite bundle) so it can go to prod on its own.
   ========================================================================== */

/* ---- 3. Footer: link groups fold on phones --------------------------------
   The heading of each group holds a button (layouts/storefront.blade.php). On
   desktop it is plain text: no pointer, no focus stop (tabindex -1 from Alpine). */
.site-footer .foot-toggle {
  all: unset;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  pointer-events: none;
}
.site-footer .foot-chev { display: none; }

@media (max-width: 640px) {
  .site-footer .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 20px 0 6px;
  }
  .site-footer .col,
  .site-footer .col-games {
    display: block;
    grid-column: auto;
    border-bottom: 1px solid var(--border-subtle);
  }
  .site-footer .col h3,
  .site-footer .foot-arts-head h3 { margin: 0; }
  .site-footer .foot-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 15px 2px;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }
  .site-footer .foot-toggle:focus-visible { outline: 2px solid var(--brand-mint); outline-offset: 2px; border-radius: 4px; }
  .site-footer .foot-chev {
    display: block;
    flex: none;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    opacity: 0.6;
    transform: translateY(-2px) rotate(45deg);
    transition: transform var(--duration-fast) var(--ease-out);
  }
  .site-footer .is-open > h3 .foot-chev,
  .site-footer .is-open > .foot-arts-head .foot-chev { transform: translateY(2px) rotate(-135deg); }

  .site-footer .col > .flink { display: none; }
  .site-footer .col.is-open { padding-bottom: 14px; }
  .site-footer .col.is-open > .flink { display: flex; padding: 7px 2px; }
  /* The games list keeps its two sub-columns once open. */
  .site-footer .col-games.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  /* Article list: one more group, closed until tapped. "All guides" stays visible. */
  .site-footer .foot-arts { padding: 0 0 26px; }
  .site-footer .foot-arts-head {
    margin: 0;
    padding: 0;
    align-items: center;
    flex-wrap: nowrap;
    border-top: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .site-footer .foot-arts-head h3 { flex: 1 1 auto; min-width: 0; }
  .site-footer .foot-arts-cols { display: none; }
  .site-footer .foot-arts.is-open .foot-arts-cols { display: block; padding: 16px 2px 8px; }
}

/* ---- 4. Chat button on phones ---------------------------------------------
   The button's own sheet (public/css/chat/) loads after this bundle, so these
   rules carry one more level of specificity. 54 px instead of 72, tucked closer
   to the corner, so it covers far less of a form (it used to sit on the
   password field at /login and on "Ask about a refund"). The product page's
   Add to cart bar still lifts it with its own transform. */
@media (max-width: 667px) {
  body .ac-chat-launcher {
    width: 54px;
    height: 54px;
    left: calc(14px + env(safe-area-inset-left, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  body .ac-chat-launcher svg { width: 27px; height: 27px; }
  body .ac-chat-launcher .ac-chat-launcher__dot { top: 0; right: 0; width: 13px; height: 13px; }
}

/* ---- 5. Login, register, password pages on phones --------------------------
   The "Did you know?" picture panel pushed the Sign In button below the first
   screen. It stays on wider screens, where it sits beside the form. */
@media (max-width: 640px) {
  .acc-login-brand { display: none; }
  .acc-login-panel { padding-top: 28px; }
}
