/* ==========================================================================
   Mex Taco House - Accessibility layer (WCAG 2.2 AA)
   Loaded last on every page. Adds visible focus, skip link, hit areas,
   pause controls, reduced-motion handling, contrast overrides and text scrims
   without changing the visual design.
   ========================================================================== */

/* --- Visually hidden text (used for "(opens in new tab)" etc.) ------------ */
.sr-only,
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --- Skip link -------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100000;
  padding: 12px 20px;
  background: #ffffff;
  color: #b91c1c;
  font-weight: 700;
  font-size: 16px;
  border: 3px solid #b91c1c;
  border-radius: 8px;
  text-decoration: none;
  transition: none;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 8px;
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
}

/* --- Visible keyboard focus (two-tone ring works on light and dark) --------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
iframe:focus-visible,
video:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible,
[role="link"]:focus-visible,
.swiper-pagination-bullet:focus-visible,
.owl-dot:focus-visible,
.nav__link:focus-visible,
.btn:focus-visible {
  outline: 3px solid #1d4ed8 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #ffffff !important;
  transition: none !important;
}
/* Mouse clicks keep the design's clean look; keyboard users get the ring. */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[tabindex]:focus:not(:focus-visible) {
  outline: none;
}
/* Main landmark is focusable for the skip link but should not show a ring. */
main#main-content:focus,
main#main-content:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
/* Inputs: keep the design's coloured border but add a real ring. */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-offset: 0 !important;
}

/* Embedded maps: Chromium does not paint an outline on a focused iframe, so ring the wrapper. */
.a11y-iframe-focus {
  outline: 3px solid #1d4ed8;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff;
}

/* --- Touch / click target sizes (WCAG 2.5.8) --------------------------------- */
.swiper-pagination-bullet {
  width: 24px !important;
  height: 24px !important;
  padding: 6px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background-clip: content-box !important;
}
.rotation-indicators .indicator {
  box-sizing: content-box;
  padding: 6px;
  background-clip: content-box !important;
}
.carousel-dots .owl-dots .owl-dot,
.owl-dot {
  min-width: 24px;
  min-height: 24px;
}

/* --- Hover / focus feedback that used to live in inline onmouseover ---------- */
#prev-news:hover,
#prev-news:focus-visible,
#next-news:hover,
#next-news:focus-visible,
.a11y-scale-hover:hover,
.a11y-scale-hover:focus-visible {
  transform: scale(1.06);
}
.a11y-scale-hover-lg:hover,
.a11y-scale-hover-lg:focus-visible {
  transform: scale(1.1);
}
.a11y-scale-hover-sm:hover,
.a11y-scale-hover-sm:focus-visible {
  transform: scale(1.02);
}
.a11y-popup-close:hover,
.a11y-popup-close:focus-visible {
  background: #f5f5f5 !important;
}
.carousel-arrow:focus-visible {
  transform: translateY(-50%) scale(1.1);
}

/* --- Pause / play controls for moving content (WCAG 2.2.2) ------------------- */
.a11y-pause-btn {
  position: absolute;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 32px;
  min-height: 32px;
  padding: 4px 10px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #111111;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  text-transform: none;
}
.a11y-pause-btn:hover {
  background: #000000;
}
.a11y-pause-btn i,
.a11y-pause-btn span {
  color: #ffffff !important;
}
.a11y-pause-btn i {
  font-size: 12px;
}
/* index.html has a universal "color: inherit !important" rule; keep inline white text computed as white */
a.order-btn[style*="color: white"] {
  color: #ffffff !important;
}
.a11y-marquee-pause {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  padding: 0;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-width: 1px;
}
#desktopMarquee,
.marquee-banner {
  position: fixed;
}
#desktopMarquee > .marquee-link,
.marquee-banner > .marquee-link {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  padding-right: 44px;
}
#desktopMarquee.is-paused > .marquee-link > div,
#desktopMarquee.is-paused .marquee-content,
.marquee-banner.is-paused .marquee-content {
  animation-play-state: paused !important;
}
.a11y-video-pause {
  right: 20px;
  bottom: 20px;
}
.slider,
.hero-video-section {
  position: relative;
}
.slider .a11y-video-pause {
  bottom: 24px;
  right: 24px;
  z-index: 60;
}
.hero-video-section .a11y-video-pause {
  bottom: 12px;
  right: 12px;
  z-index: 60;
}

/* --- Reduced motion (WCAG 2.3.3) ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #desktopMarquee > .marquee-link > div,
  #desktopMarquee > div,
  .marquee-content {
    animation-play-state: paused !important;
  }
  .swiper-wrapper {
    transition-duration: 0.01ms !important;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

/* --- Text scrims for undetermined contrast (video, banners, nav) ------------- */
.header-over-video .navbar:not(.fixed-navbar) {
  background-color: rgba(0, 0, 0, 0.72) !important;
}
@media (max-width: 991px) {
  .header-over-video .navbar:not(.fixed-navbar) {
    background-color: transparent !important;
  }
}
.slider .slide__content {
  display: inline-block;
  padding: 28px 40px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.7);
}
.hero-video-section .hero-content,
.hero .hero-content {
  padding: 20px 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.7);
}
.news-hero .container,
.contact-hero .container {
  background: rgba(0, 0, 0, 0.65);
  border-radius: 14px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.reviews-banner > .container,
.reviews-banner .container {
  background: rgba(120, 10, 10, 0.55);
  border-radius: 14px;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* --- Colour contrast substitutions (text under 24px) ------------------------- */
.footer-copyright,
.footer-copyright .current-year,
.footer-desktop-link,
.section-dark .text-gray {
  color: #9ca3af !important;
}
.footer-phone a,
.footer-hours-title,
.footer-hours-item .closed,
.mobile-menu-hours-item.closed span:last-child {
  color: #ef4444 !important;
}
.order-option-icon.ubereats,
.order-now-platform.ubereats,
.mobile-order-dropdown-icon.ubereats {
  background: #0a7a44 !important;
}
.news-badge.catering {
  background: #b45309 !important;
}
.news-badge.holiday {
  background: #047857 !important;
}

/* --- Footer column titles that used to be h5/h6 (same look, not headings) ---- */
.footer-col-title,
.footer-sub-title {
  font-family: "Rubik", sans-serif;
  line-height: 1.1;
  text-transform: capitalize;
}
.a11y-rotator-pause {
  z-index: 5;
}

/* --- Off-canvas menu panels: not reachable by Tab while closed --------------- */
.mobile-menu-panel:not(.active) {
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), right 300ms ease, visibility 0s linear 0.35s;
}
.mobile-menu-panel.active {
  visibility: visible;
}

/* --- Keyboard-reachable scroller (mobile reviews) ---------------------------- */
.reviews-container:focus-visible {
  outline-offset: -3px !important;
}

/* --- News cards that act as buttons ------------------------------------------ */
.news-card[role="button"] {
  cursor: pointer;
}

/* --- Keep responsive heading sizes identical after level changes ------------- */
@media (max-width: 767px) {
  .feature__title,
  .slide-overlay h3 {
    line-height: 1.4 !important;
  }
  .video-modal-description h3 {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }
  .page-home .video-modal-title,
  .page-home .footer h2,
  .page-home .call-popup h2 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
}
