/* =========================================================================
   Custom: Cart & Account -> sliding side drawer (opens on click, fast)
   Works identically on desktop and mobile. Only container/position/motion
   is changed — the mini-cart and account menu content stay the same.
   ========================================================================= */

/* Lock page scroll while a drawer is open */
body.cz-drawer-open {
  overflow: hidden;
}

/* Dark backdrop behind the drawer */
.cz-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  z-index: 1090;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}
.cz-drawer-backdrop.show {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.18s ease, visibility 0s linear 0s;
}

/* The two panels we turn into drawers: mini-cart (.cartzilla-cart) and the
   account menu (.dropdown-menu) that live inside .navbar-tool.dropdown */
.navbar-tool.dropdown > .dropdown-menu,
.navbar-tool.dropdown > .cartzilla-cart {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  bottom: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  width: 380px;
  max-width: 92vw;
  margin: 0 !important;
  padding-top: 3.25rem !important;
  display: flex !important;
  flex-direction: column;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: -0.75rem 0 2rem rgba(15, 23, 42, 0.14) !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 1091;

  /* hidden state: parked just off-screen to the right */
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden !important;
  pointer-events: none !important;

  /* fast open/close — tweak the 0.2s values to taste */
  transition: transform 0.2s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.2s ease, visibility 0s linear 0.2s;
}
.navbar-tool.dropdown > .dropdown-menu.show,
.navbar-tool.dropdown > .cartzilla-cart.show {
  transform: translateX(0);
  opacity: 1;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: transform 0.2s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.2s ease, visibility 0s linear 0s;
}

/* Fully neutralise the theme's built-in "open on hover" behaviour for these
   two drawers — only a click should ever open/close them now. Without this,
   hovering the trigger (or the open panel itself, since it is still a DOM
   child of the trigger) re-triggers the theme's own hover animation and
   causes a visible flicker. */
.navbar-tool.dropdown:hover > .dropdown-menu,
.navbar-tool.dropdown:hover > .cartzilla-cart,
.navbar .navbar-tool.dropdown:hover > .dropdown-menu,
.navbar .navbar-tool.dropdown:hover > .cartzilla-cart {
  animation: none !important;
}
.navbar-tool.dropdown:hover > .dropdown-menu:not(.show),
.navbar-tool.dropdown:hover > .cartzilla-cart:not(.show) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 575.98px) {
  .navbar-tool.dropdown > .dropdown-menu,
  .navbar-tool.dropdown > .cartzilla-cart {
    width: 100%;
    max-width: 100vw;
  }
}

/* Close (X) button injected by JS */
.cz-drawer-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  background: transparent;
  font-size: 1.375rem;
  line-height: 1;
  color: #4b566b;
  cursor: pointer;
  z-index: 2;
}
.cz-drawer-close:hover {
  background: #f3f5f8;
  color: #fe696a;
}

/* The little caret after "My Cart" / account name text looks odd once this
   becomes a full drawer trigger — hide it */
.navbar-tool.dropdown .navbar-tool-text::after {
  display: none;
}

/* =========================================================================
   Account dropdown menu: less cramped, clearer separators between items
   ========================================================================= */
.navbar-tool.dropdown > .dropdown-menu .dropdown-item {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #eef1f5;
}
.navbar-tool.dropdown > .dropdown-menu li:last-child .dropdown-item,
.navbar-tool.dropdown > .dropdown-menu .dropdown-item:last-of-type {
  border-bottom: 0;
}
.navbar-tool.dropdown > .dropdown-menu .dropdown-divider {
  margin: 0.25rem 0;
}

/* =========================================================================
   My Account page navigation (Dashboard / Orders / Downloads / ...):
   more breathing room + clear borders between links
   ========================================================================= */
.woocommerce-MyAccount-navigation {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.woocommerce-MyAccount-navigation ul.list-unstyled {
  border-top: 1px solid #e3e9ef;
}
.woocommerce-MyAccount-navigation ul.list-unstyled li {
  border-bottom: 1px solid #e3e9ef !important;
  margin-bottom: 0 !important;
}
.woocommerce-MyAccount-navigation ul.list-unstyled li a.nav-link-style {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}
