/* BottomSheet — lembar bawah generik (lihat BottomSheet.js).
 * Tertutup = digeser keluar layar, bukan display:none, supaya transisi
 * buka/tutup halus. `visibility` ikut disembunyikan agar isinya tidak
 * bisa di-Tab saat tertutup. */

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 620px);
  background: var(--wb-panel-raised, #16181d);
  border: 1px solid var(--wb-rule, rgba(255, 255, 255, 0.08));
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  color: var(--wb-ink, inherit);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.24s;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.bottom-sheet__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 12px 8px 16px;
  touch-action: none; /* seret kepala = geser lembar, bukan gulir halaman */
  cursor: grab;
}

.bottom-sheet__grip {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: var(--wb-field-strong, rgba(255, 255, 255, 0.22));
}

.bottom-sheet__title {
  flex: 1;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display, inherit);
}

.bottom-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.bottom-sheet__close:hover,
.bottom-sheet__close:focus-visible {
  background: var(--wb-field, rgba(255, 255, 255, 0.06));
}

.bottom-sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 16px 16px;
}

@media (prefers-reduced-motion: reduce) {
  .bottom-sheet,
  .bottom-sheet.is-open { transition: none; }
}
