/**
 * Wehome sheet — Premium Craft stagger (motion.md §5)
 * backdrop → panel → focus
 */

.wh-sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--wh-z-overlay, 9000);
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  transition:
    background var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1)),
    opacity var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1)),
    backdrop-filter var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1)),
    -webkit-backdrop-filter var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1));
}
.wh-sheet-backdrop.wh-sheet-backdrop--open,
.wh-sheet-backdrop.is-open {
  display: block;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 1;
}

.wh-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  z-index: var(--wh-z-modal, 10000);
  background: var(--wh-card, #fff);
  border-radius: var(--wh-radius-xl, 28px) var(--wh-radius-xl, 28px) 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transform: translateX(-50%) translateY(12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--wh-motion-sheet, 480ms) var(--wh-ease-spring, cubic-bezier(0.34, 1.28, 0.64, 1)),
    opacity var(--wh-motion-slow, 380ms) var(--wh-ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1));
}
.wh-sheet.wh-sheet--open,
.wh-sheet.is-open {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.wh-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--wh-tx3, #8b95a1);
  border-radius: 2px;
  margin: 10px auto 8px;
}

@media (prefers-reduced-motion: reduce) {
  .wh-sheet-backdrop,
  .wh-sheet {
    transition: none !important;
  }
  .wh-sheet {
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
  }
}
