/* =============================================================================
   FILE: resources/css/components/bottom-sheet.css
   Frontend Spec Section 5.10 — Bottom Sheet
============================================================================= */

.sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background-color: rgba(22, 33, 29, 0.4);
  opacity: 0;
  transition: opacity var(--ease-sheet);
}

.sheet-scrim.is-visible {
  opacity: 1;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-height: 85vh;
  overflow-y: auto;
  background-color: var(--color-paper);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-sheet);
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform var(--ease-sheet);
}

.bottom-sheet.is-open {
  transform: translateY(0);
}

@media (min-width: 600px) {
  .bottom-sheet {
    left: 50%;
    right: auto;
    bottom: var(--space-6);
    width: 100%;
    max-width: var(--content-max-width-sm);
    margin-left: calc(var(--content-max-width-sm) / -2);
    border-radius: var(--radius-lg);
  }
}

.bottom-sheet__handle {
  width: 32px;
  height: 4px;
  background-color: var(--color-border);
  border-radius: 999px;
  margin: 0 auto var(--space-3);
}

.bottom-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.bottom-sheet__close {
  width: var(--tap-target-min);
  height: var(--tap-target-min);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-muted);
}

.bottom-sheet__close svg {
  width: 20px;
  height: 20px;
}

.bottom-sheet__footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
