/*
 * Sidebar cart drawer — slides in from the right, opened from the header's
 * cart icon. Same design language as the floating cart bubble; item rows,
 * qty stepper, remove button, and footer are the exact same markup/CSS/JS
 * (see floating-cart.css/.js) — this file only styles the drawer's own
 * shell: backdrop, sliding panel, header, close button.
 */

.fpx-cdrawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 399; /* just below the drawer panel (400), above everything else */
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.fpx-cdrawer.is-open .fpx-cdrawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.fpx-cdrawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 400;
  width: min(420px, 100vw);
  height: 100dvh;
  background: #fff;
  box-shadow: -12px 0 40px rgba(17, 24, 39, 0.18);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Inter", sans-serif;
}
.fpx-cdrawer.is-open .fpx-cdrawer-panel {
  transform: translateX(0);
}
.fpx-cdrawer-panel[hidden] {
  display: none;
}

/* Mirrors `.fpx-fcart-panel__header` in floating-cart.css — the same tinted
   masthead the Cart and Checkout Order Summary cards use, so all four cart
   surfaces on the site open the same way. */
.fpx-cdrawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 16px 22px;
  background: var(--brand-grad-soft), #fff; /* two-colour wash, see global.css :root */
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  flex-shrink: 0;
}
.fpx-cdrawer-header .fpx-fcart-panel__title {
  color: var(--color-primary-dark);
}
/* button-tag-prefixed — a bare single class here loses the `color` property
   to the shared `.fpx-fcart button, .fpx-cdrawer button` reset in
   floating-cart.css, which has higher specificity (class+tag vs. one class). */
button.fpx-cdrawer-close {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  background: #f6f7f8 !important;
  color: #6b7280 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
button.fpx-cdrawer-close:hover {
  background: #eef0f2 !important;
  color: #374151 !important;
  transform: rotate(90deg);
}
.fpx-cdrawer-close svg {
  width: 15px;
  height: 15px;
}

/* Scrollable item list — reuses .fpx-fcart-list/.fpx-fcart-item styling from
   floating-cart.css automatically; this just governs the scroll container. */
.fpx-cdrawer-body {
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.fpx-cdrawer-body::-webkit-scrollbar {
  width: 6px;
}
.fpx-cdrawer-body::-webkit-scrollbar-track {
  background: transparent;
}
.fpx-cdrawer-body::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 999px;
}
.fpx-cdrawer-body::-webkit-scrollbar-thumb:hover {
  background-color: #9ca3af;
}

@media (max-width: 480px) {
  .fpx-cdrawer-panel {
    width: 100vw;
  }
}
