/* Modals + bottom sheets. Mobile-first: bottom-sheet style (slides up). */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(10 22 40 / 32%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdrop-in 180ms ease-out;
}

.modal-backdrop.center {
  align-items: center;
}

@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sheet {
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  overflow: auto;
  padding: var(--s-5) var(--s-5) max(var(--s-5), env(safe-area-inset-bottom));
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  background: var(--canvas);
  box-shadow: var(--shadow-pop);
  display: grid;
  gap: var(--s-4);
  animation: sheet-up 260ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.modal-backdrop.center .sheet {
  border-radius: var(--r-xl);
  margin: 0 var(--s-5);
  animation: sheet-in 220ms ease-out;
}

@keyframes sheet-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sheet-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.sheet-grabber {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  margin: 0 auto var(--s-3);
}

.sheet-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 30px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.sheet-sub {
  margin: 0;
  font-size: 14.5px;
  line-height: 21px;
  color: var(--text-secondary);
}

.sheet-actions {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
