/* Styles for the cart-drawer partial (site/partials/cart-drawer.html).
 * The checkout-kit markup itself (co-*, screens/sections) is styled by
 * site/css/components/cart.css, imported globally via base.css -- this
 * file only positions the shell around it.
 *
 * Full-page takeover, not a floating centered card and not a narrow
 * slide-out side panel (both tried here earlier) -- same full-bleed
 * treatment as the real /checkout page, just shown as an overlay instead
 * of a navigation so nothing is lost closing it. Keeping the existing
 * "drawer" names (data-cart-drawer, openDrawer(), the .cart-drawer*
 * classes) since they're already wired through header.html/cart.js and
 * the concept (an overlay toggled by a class, no navigation) hasn't
 * changed -- just how much of the screen it fills.
 */

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  pointer-events: none;
}

.cart-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  background: var(--color-base-100, #f8f8f8);
  opacity: 0;
}
.cart-drawer.is-open .cart-drawer__backdrop {
  opacity: 1;
}

.cart-drawer__panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  background: var(--color-base-100, #f8f8f8);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.cart-drawer.is-open .cart-drawer__panel {
  opacity: 1;
}

.cart-drawer__close {
  position: absolute;
  top: var(--space-s);
  right: var(--space-m);
  width: 2rem;
  height: 2rem;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.cart-drawer .checkout {
  min-height: 100vh;
}

body.cart-drawer-open {
  overflow: hidden;
}
