/*
 * mobile-drawer.css — ANZ v3 Mobile Navigation Drawer Component
 *
 * Namespace: .anz-v3-mobile-drawer
 * Covers: mobile nav drawer (OQ10 resolution)
 * All selectors scoped: body.anz-v3 .anz-v3-mobile-drawer*
 * No hex values — var(--...) only.
 *
 * Phase 4 pages: shop, collections (mobile)
 * OQ10 resolution: slides from left on mobile (<768px).
 * Desktop: hidden (sidebar-accordion.css handles desktop).
 * Provenance: plan §3 OQ10 resolution
 */


/* ===================================================================
 * DRAWER OVERLAY
 * =================================================================== */

body.anz-v3 .anz-v3-mobile-drawer__overlay {
  background-color: var(--anz-deep-sea);
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity var(--motion-standard) var(--motion-easing);
  z-index: 400000;
}

body.anz-v3 .anz-v3-mobile-drawer.is-open .anz-v3-mobile-drawer__overlay {
  opacity: 0.55;
  pointer-events: auto;
}


/* ===================================================================
 * DRAWER PANEL — slides in from left
 * =================================================================== */

body.anz-v3 .anz-v3-mobile-drawer__panel {
  background-color: var(--surface);
  bottom: 0;
  display: flex;
  flex-direction: column;
  left: 0;
  max-width: 320px;
  position: fixed;
  top: 0;
  transform: translateX(-100%);
  transition: transform var(--motion-standard) var(--motion-easing);
  width: 85%;
  z-index: 400001;
}

body.anz-v3 .anz-v3-mobile-drawer.is-open .anz-v3-mobile-drawer__panel {
  transform: translateX(0);
}


/* ===================================================================
 * DRAWER HEADER
 * =================================================================== */

body.anz-v3 .anz-v3-mobile-drawer__header {
  align-items: center;
  background-color: var(--surface-inverse);
  color: var(--text-on-inverse);
  display: flex;
  justify-content: space-between;
  padding: var(--space-4);
}

body.anz-v3 .anz-v3-mobile-drawer__title {
  color: var(--text-on-inverse);
  font-size: var(--type-body-m-size);
  font-weight: var(--font-weight-medium);
  margin: 0;
}

body.anz-v3 .anz-v3-mobile-drawer__close {
  align-items: center;
  background: transparent;
  border: none;
  color: var(--text-on-inverse);
  cursor: pointer;
  display: flex;
  font-size: var(--type-h3-size);
  justify-content: center;
  opacity: 0.8;
  padding: var(--space-2);
  transition: opacity var(--motion-fast) var(--motion-exit);
}

body.anz-v3 .anz-v3-mobile-drawer__close:focus,
body.anz-v3 .anz-v3-mobile-drawer__close:hover {
  opacity: 1;
}


/* ===================================================================
 * DRAWER CONTENT — scrollable nav list
 * =================================================================== */

body.anz-v3 .anz-v3-mobile-drawer__content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) 0;
  -webkit-overflow-scrolling: touch;
}

body.anz-v3 .anz-v3-mobile-drawer__nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.anz-v3 .anz-v3-mobile-drawer__nav-item {
  border-bottom: 1px solid var(--border);
  display: block;
}

body.anz-v3 .anz-v3-mobile-drawer__nav-link {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: var(--type-body-m-size);
  justify-content: space-between;
  padding: var(--space-4);
  text-decoration: none;
  transition: background-color var(--motion-fast) var(--motion-exit);
}

body.anz-v3 .anz-v3-mobile-drawer__nav-link:focus,
body.anz-v3 .anz-v3-mobile-drawer__nav-link:hover {
  background-color: var(--bg-wash);
  color: var(--anz-pacific-blue);
  text-decoration: none;
}

body.anz-v3 .anz-v3-mobile-drawer__nav-link--active {
  color: var(--anz-pacific-blue);
  font-weight: var(--font-weight-medium);
}

body.anz-v3 .anz-v3-mobile-drawer__nav-icon {
  color: var(--text-muted);
  font-size: var(--type-body-s-size);
}

/* Category names come from catalogue data in Title Case (e.g. "Staff Rewards") —
   render as sentence case visually without touching the underlying data. */
body.anz-v3 .anz-v3-mobile-drawer__nav-link > span {
  display: inline-block;
  text-transform: lowercase;
}
body.anz-v3 .anz-v3-mobile-drawer__nav-link > span::first-letter {
  text-transform: uppercase;
}


/* ===================================================================
 * RESPONSIVE — only visible on mobile
 * =================================================================== */

@media (min-width: 769px) {
  body.anz-v3 .anz-v3-mobile-drawer {
    display: none;
  }
}


/* ===================================================================
 * REDUCED MOTION
 * =================================================================== */

@media (prefers-reduced-motion: reduce) {
  body.anz-v3 .anz-v3-mobile-drawer__panel,
  body.anz-v3 .anz-v3-mobile-drawer__overlay,
  body.anz-v3 .anz-v3-mobile-drawer__close,
  body.anz-v3 .anz-v3-mobile-drawer__nav-link {
    transition: none;
  }

  body.anz-v3 .anz-v3-mobile-drawer__panel {
    transform: translateX(0);
  }

  body.anz-v3 .anz-v3-mobile-drawer:not(.is-open) .anz-v3-mobile-drawer__panel {
    display: none;
  }
}
