/*
 * fotoxreseller drawer styles
 * 文件：static/css/components/drawer.css
 *
 * 与 static/js/vaul-drawer.js 配套使用。CSS 变量（--fx-sheet-curve, --fx-bg）
 * 由 Phase 1 的 static/css/input.css / global.css 提供，这里都有 fallback。
 *
 * 视觉规格来源 / Visual spec source:
 *   docs/competitor-research-full/clothoff/js-decompiled/_findings.md §1
 *   - bottom-sheet 圆角:  24px 24px 0 0
 *   - side-right  圆角:  0
 *   - bottom overlay:    rgba(0,0,0,0)（透明）
 *   - side-right overlay: rgba(0,0,0,0.4)
 *   - 无 backdrop-blur（Recipe 22 校正）
 */

.fx-drawer {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition:
    transform 500ms var(--fx-sheet-curve, cubic-bezier(0.32, 0.72, 0, 1)),
    opacity 500ms var(--fx-sheet-curve, cubic-bezier(0.32, 0.72, 0, 1));
  will-change: transform;
}

.fx-drawer[data-direction="bottom"] {
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(100%);
  border-radius: 24px 24px 0 0;
  background: var(--fx-bg-popup, var(--fx-bg, #0a0a0a));
  max-height: 95dvh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fx-drawer[data-direction="right"] {
  top: 0;
  right: 0;
  bottom: 0;
  transform: translateX(100%);
  width: min(600px, 100vw);
  background: rgb(0, 0, 0);
  height: 100dvh;
  border-radius: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fx-drawer[data-state="open"] {
  transform: translateX(0) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.fx-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--fx-sheet-curve, cubic-bezier(0.32, 0.72, 0, 1));
}

/* clothoff 实测：bottom 方向 overlay 完全透明（不挡视线，仅截击点击） */
.fx-drawer-overlay[data-direction="bottom"] {
  background: rgba(0, 0, 0, 0);
}

/* clothoff 实测：side-right overlay 半透明黑、无 backdrop-blur */
.fx-drawer-overlay[data-direction="right"] {
  background: rgba(0, 0, 0, 0.4);
}

.fx-drawer-overlay[data-state="visible"] {
  opacity: 1;
  pointer-events: auto;
}

/* 视觉把手 / handle bar — 用 [data-vaul-handle] 标记 */
.fx-drawer [data-vaul-handle],
.fx-drawer-handle {
  width: 48px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.3);
  margin: 12px auto;
  flex-shrink: 0;
}
