/* public/css/components/dropdown-mobile.css — APPLE MOBILE + SUBMENU SLIDE */

/* Basic mobile apple menu container (if you also use mobile-menu.css keep this complementary) */
.mobile-apple-menu {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,1);
  color: #fff;
  z-index: 3000;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 64px; /* room for header */
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* active */
.mobile-apple-menu.active {
  display: block;
  opacity: 1;
}

/* Close button top-right */
.apple-menu-close {
  position: absolute;
  right: 14px;
  top: 12px;
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px;
  font-size: 20px;
  cursor: pointer;
}

/* Level 1 list */
.apple-mobile-list {
  list-style: none;
  margin: 0;
  padding: 10px 22px;
}

/* level1 items */
.apple-mobile-list li {
  margin-bottom: 18px;
}

/* buttons to open submenu */
.apple-mobile-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  background: transparent;
  border: none;
  padding: 12px 0;
  text-align: left;
  cursor: pointer;
}

/* chevron on level1 */
.apple-mobile-btn i {
  font-size: 20px;
  opacity: 0.9;
  transition: transform .25s ease;
}

/* Submenu panels (off-canvas panels sliding in) */
.apple-submenu {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  background: rgba(0,0,0,1);
  padding: 64px 22px 22px 22px;
  box-sizing: border-box;
  transform: translateX(100%); /* offscreen to right */
  opacity: 0;
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(.2,.9,.25,1), opacity .24s ease, visibility .01s linear .32s;
  z-index: 3010;
}

/* visible panel */
.apple-submenu.active,
.apple-submenu.visible {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  transition: transform 0.32s cubic-bezier(.2,.9,.25,1), opacity .24s ease;
}

/* entering/leaving states for nicer timing (JS toggles these classes) */
.apple-submenu.entering {
  transform: translateX(0);
  opacity: 1;
}
.apple-submenu.leaving {
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
}

/* submenu back button */
.submenu-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  padding: 8px 0;
  cursor: pointer;
}

/* submenu links */
.apple-submenu a {
  display: block;
  padding: 12px 0;
  color: rgba(255,255,255,0.95);
  font-size: 27px;
  font-weight: 640;
  text-decoration: none;
  border-bottom: 0;
}

/* small subtitle inside submenu (optional) */
.apple-submenu .mobile-title {
  color: #bbb;
  font-size: 13px;
  margin: 6px 0 14px 0;
}

/* small visual polish */
.apple-submenu a:hover { color: #fff; }

/* hide level1 while panel visible */
.apple-mobile-list.hidden {
  opacity: 0;
  transform: translateX(-8%);
  transition: opacity .18s ease, transform .22s ease;
  pointer-events: none;
}

/* Accessibility: ensure focusable outlines */
.mobile-apple-menu button:focus,
.mobile-apple-menu a:focus {
  outline: 2px solid rgba(255,255,255,0.08);
  outline-offset: 2px;
}

/* Desktop safety: hide mobile menu on wide screens */
@media (min-width: 992px) {
  .mobile-apple-menu { display: none !important; }
}