/* Site fixes on top of the converted live CSS (owner-approved). Loaded last by src/layouts/Live.astro. */

/* Tap targets of at least 24px without moving anything: the box grows, negative margins keep the layout, and the
   visible part (icon bars, dot) stays where it was. */
button.flex.flex-col.justify-around.w-5.h-5,
button.close-menu-btn {
  box-sizing: content-box !important;
  padding: 2px !important;
  margin: -2px !important;
}
.slick-dots li button {
  width: 24px !important;
  height: 24px !important;
  margin: -6px 0 0 -6px !important;
}
.slick-dots li button::before {
  top: 6px !important;
  left: 6px !important;
}

/* Contrast: the testimonial role was white on the yellow band (1.9:1); it takes the colour of the name above it. */
.bg-yellow-300 .testimonial-owner-role {
  color: inherit !important;
}

/* Mobile menu on the right: logo left, open button right, and the panel slides in from the right with its close
   button on the same side. */
@media (max-width: 767.98px) {
  header > div > button:first-child {
    order: 2;
  }
  header .fixed.inset-0.md\:hidden.-translate-x-full {
    --tw-translate-x: 100%;
  }
  header .fixed.inset-0.md\:hidden > .close-menu-btn {
    align-self: flex-end;
  }
}

/* Page headers with polygons: the title is painted above them, so long titles (case studies) stay readable. */
:has(> img[class*="polygon-"]) > :is(h1, h2, p) {
  position: relative;
  z-index: 1;
}

/* Mobile testimonials: the quote reads at body-copy size (the 20px of the site's section paragraphs), not 32px. */
@media (max-width: 767.98px) {
  .testimonial-text {
    font-size: 20px !important;
    line-height: 28px !important;
  }
}

/* FAQ panels: live.js animates them; the captured keyframes (fixed 80px height) are off. */
[role="region"][data-state] {
  animation: none !important;
}

/* Blog "In This Article" on mobile: room under the last entry when the list is open. */
@media (max-width: 767.98px) {
  ul:has(a[aria-label^="scroll to "]):not(.max-h-0) {
    padding-bottom: 1.5rem;
  }
}

/* Mobile: the header stays on top while scrolling, so the "Back to top" button is no longer needed. */
@media (max-width: 767.98px) {
  body > #__next > div > header {
    position: sticky;
    top: 0;
  }
  main > button.fixed.md\:hidden:has(img[src$="arrow-up.svg"]) {
    display: none;
  }
  /* "In This Article" jumps land below the header, not under it. */
  .blog-content :is(h2, h3, h4) {
    scroll-margin-top: 84px;
  }
}

/* iPhone: no dark flash when tapping a FAQ question or the "In This Article" toggle. Keyboard focus still shows. */
button[aria-controls] {
  -webkit-tap-highlight-color: transparent;
}

/* Stacked three-column sections (CWV metrics, Website & AI Solutions): text centered while the columns stack, like
   the heading and the Read More button above and below it. */
@media (max-width: 1023.98px) {
  .flex.flex-col.lg\:px-6.first\:pl-0.pb-16.border-slate-gray {
    text-align: center;
  }
}
