/**
 * Zuni Café – accessibility fixes (WCAG 2.1 AA)
 * Load after the theme's main stylesheet.
 */

/* ---------------------------------------------------------------
 * 1. Hero slideshow pause/play button (2.2.2, 2.4.7, 2.5.8)
 * --------------------------------------------------------------- */
.slideshow-toggle {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(37, 33, 33, 0.7); /* theme dark #252121 */
  color: #fff;
  cursor: pointer;
}
.slideshow-toggle:hover { background: rgba(37, 33, 33, 0.9); }
.slideshow-toggle:focus-visible {
  outline: 3px solid #f8c336; /* theme gold */
  outline-offset: 3px;
}
.slideshow-toggle .icon-play,
.slideshow-toggle.is-paused .icon-pause { display: none; }
.slideshow-toggle.is-paused .icon-play { display: block; }

/* 2. Belt-and-braces: hide the old arrows if they're ever re-enabled */
.slideshow .bss-controls,
.slideshow .bss-prev,
.slideshow .bss-next { display: none !important; }

/* ---------------------------------------------------------------
 * 3. Menu: closed menu is off-screen (translateY) but its links were
 *    still reachable by Tab. Hide it properly once the slide-up ends.
 * --------------------------------------------------------------- */
.menu-container {
  visibility: hidden;
  transition: transform 0.5s ease-in-out, visibility 0s linear 0.5s;
}
.menu-container.active {
  visibility: visible;
  transition: transform 0.5s ease-in-out, visibility 0s linear 0s;
}
button[data-menu]:focus-visible,
.menu-container a:focus-visible {
  outline: 3px solid #f8c336;
  outline-offset: 3px;
}

/* ---------------------------------------------------------------
 * 4. Menu address/phone contrast (1.4.3)
 *    Was #676464 on #252121 = 2.7:1. #A9A6A6 on #252121 = 6.5:1.
 * --------------------------------------------------------------- */
.menu-container .restaurant-info,
.menu-container .restaurant-info a {
  color: #a9a6a6;
}

/* ---------------------------------------------------------------
 * 5. Skip link (2.4.1) – hidden until focused
 * --------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100000; /* above the fixed header and UserWay */
  padding: 12px 20px;
  background: #fff;
  color: #252121;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
  outline: 3px solid #f8c336;
  outline-offset: 2px;
}
#main:focus { outline: none; } /* programmatic focus target only */

/* Visually hidden text (used for "(opens in new tab)"); the theme may already
   define this, repeated here so it never shows up on screen. */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------
 * 6. Logo link focus ring
 * --------------------------------------------------------------- */
a[rel="home"]:focus-visible {
  outline: 3px solid #f8c336;
  outline-offset: 4px;
}

/* ---------------------------------------------------------------
 * 7. Instagram feed (Smash Balloon) – the plugin sets
 *    "#sb_instagram a:focus { outline: none }". Restore a visible
 *    focus ring for keyboard users (2.4.7). Mouse clicks unaffected.
 * --------------------------------------------------------------- */
#sb_instagram a:focus-visible,
#sb_instagram button:focus-visible,
.sbi_lightbox a:focus-visible,
.sbi_lightbox button:focus-visible {
  outline: 3px solid #f8c336 !important;
  outline-offset: 2px !important;
}

/* ---------------------------------------------------------------
 * Respect reduced-motion for the menu slide too
 * --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .menu-container,
  .menu-container.active { transition: none; }
}
