/* Bottom sheets (js/core/sheet.js): the overlay, the backdrop and the panel with its head and body. */
#overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  animation: fade-in 0.2s ease;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  padding-bottom: var(--safe-bottom);
  pointer-events: auto;
  animation: slide-up 0.2s ease;
}

.sheet-tall {
  height: 88%;
}

/* No ✕ and no grip: the head holds the title and the header buttons (📤, ⋯), 44×44 each. */
.sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 12px 16px 4px;
}

.sheet-head-actions {
  min-height: 52px;
  padding: 4px 100px;
}

/* Titles can carry a name (the rating sheet): a long one wraps instead of leaving the sheet. */
.sheet-title {
  min-width: 0;
  margin: 4px 0 0;
  font-size: 16px;
  text-align: center;
  overflow-wrap: anywhere;
}

.sheet-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  display: flex;
}

.sheet-action {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  cursor: pointer;
}

.sheet-action:active {
  background: var(--bg2);
}

.sheet-body {
  overflow-y: auto;
  padding: 0 var(--gap) var(--gap);
}

.sheet-leaving {
  opacity: 0;
  transition: opacity 0.2s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
}
