/* /css/SiteDrawer.css
// ==========================================================
// Sudoku Paradise — Global Site Drawer
// ----------------------------------------------------------
// Role:
//   • Upper-left Explore button
//   • Fixed left-side navigation drawer
//   • Backdrop and responsive presentation
//   • No Sudoku gameplay responsibilities
// ========================================================== */

.site-menu-button {
  appearance: none;
  box-sizing: border-box;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 4100;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;

  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 0.8rem;

  border: 1px solid rgba(11, 104, 112, 0.38);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 10px rgba(20, 55, 60, 0.18);

  color: #0b6870;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.site-menu-button:hover {
  background: #ffffff;
  border-color: #0b6870;
}

.site-menu-button:focus-visible {
  outline: 3px solid rgba(11, 104, 112, 0.35);
  outline-offset: 3px;
}

.site-menu-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 3px;

  /* Hide the original ☰ character. */
  overflow: visible;
  color: transparent;
  font-size: 0;

  /* Draw three reliably bold bars. */
  border-radius: 2px;
  background: #10183b;
  box-shadow:
    0 6px 0 #10183b,
    0 12px 0 #10183b;
  margin-top: -12px;
}

.site-drawer-close {
  padding: 0;
}

.site-drawer-close-glyph {
  display: block;
  line-height: 1;
  transform: translateY(-3px);
}

.site-drawer-close::before,
.site-drawer-close::after {
  content: "";
  content: none;
  display: none;  
  position: absolute;
  top: 47%;
  left: 50%;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: #0b6870;
}

.site-drawer-close {
  color: #07575f;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.site-drawer-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.site-drawer-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.site-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 4190;

  background: rgba(10, 25, 28, 0.48);
  opacity: 0;

  transition: opacity 180ms ease;
}

.site-drawer-backdrop[hidden] {
  display: none;
}

.site-drawer-backdrop.is-open {
  opacity: 1;
}

.site-drawer {
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4200;

  width: min(320px, 88vw);
  height: 100vh;
  height: 100dvh;
  padding: 1rem;

  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;

  border-right: 1px solid rgba(11, 104, 112, 0.32);
  background:
    linear-gradient(
      180deg,
      rgba(247, 255, 254, 0.99),
      rgba(235, 249, 247, 0.99)
    );
  box-shadow: 10px 0 28px rgba(12, 38, 42, 0.25);

  color: #243b3e;

  transform: translateX(-105%);
  visibility: hidden;

  transition:
    transform 220ms ease,
    visibility 0s linear 220ms;
}

.site-drawer.is-open {
  transform: translateX(0);
  visibility: visible;

  transition:
    transform 220ms ease,
    visibility 0s linear 0s;
}

.site-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  padding: 0.15rem 0 0.85rem;
  border-bottom: 1px solid rgba(11, 104, 112, 0.22);
}

.site-drawer-title {
  margin: 0;
  color: #0b6870;
  font-size: 1.3rem;
  line-height: 1.2;
}

.site-drawer-close {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  min-width: 38px;
  margin: 0;
  padding: 0;

  border: 1px solid rgba(11, 104, 112, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;

  color: #0b6870;
  cursor: pointer;
  font: inherit;
  font-size: 1.45rem;
  line-height: 1;
}

.site-drawer-close:hover {
  background: #ffffff;
  border-color: #0b6870;
}

.site-drawer-close:focus-visible {
  outline: 3px solid rgba(11, 104, 112, 0.35);
  outline-offset: 2px;
}

.site-drawer-nav {
  padding: 0.4rem 0 1.5rem;
}

.site-drawer-group {
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(11, 104, 112, 0.15);
}

.site-drawer-group:last-child {
  border-bottom: 0;
}

.site-drawer-heading {
  margin: 0 0 0.35rem;
  color: #547174;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-drawer-nav a {
  display: block;
  margin: 0.12rem 0;
  padding: 0.6rem 0.7rem;

  border-radius: 8px;

  color: #164e54;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
}

.site-drawer-nav a:hover,
.site-drawer-nav a:focus-visible {
  background: rgba(11, 104, 112, 0.1);
  color: #084f56;
  outline: none;
  text-decoration: none;
}

.site-drawer-nav a[aria-current="page"] {
  background: rgba(11, 104, 112, 0.14);
  color: #084f56;
}

.site-drawer-nav a[aria-current="page"]::after {
  content: " •";
}

body.site-drawer-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .site-menu-button {
    top: 8px;
    left: 8px;
    height: 38px;
    padding: 0 0.65rem;
    font-size: 0.86rem;
  }

  .site-drawer {
    width: min(300px, 90vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-drawer,
  .site-drawer-backdrop {
    transition: none;
  }
}