/*
 * modal.css — Reusable slide-up modal component
 * Grailsome Design System — Consumer-Grade Refactor
 */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 13, 8, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}

.modal-overlay--visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80dvh;
  background: var(--color-ivory);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 32px rgba(26, 13, 8, 0.15);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 400ms var(--ease-out);
}

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

.modal-handle {
  width: 36px;
  height: 4px;
  background: rgba(26, 13, 8, 0.15);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 16px;
  border-bottom: 1px solid rgba(26, 13, 8, 0.08);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-ink);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-ink-muted);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--color-ink);
}

.modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  scrollbar-width: none;
}

.modal-content::-webkit-scrollbar {
  display: none;
}
