/* Janela que sobe de baixo (bottom sheet): alça, scrim e painel. Comportamento em src/js/components/sheet.js.
   Estrutura: .sheet-root > (.sheet-scrim + .sheet-panel > (.sheet-head) + .sheet-body). A alça é criada pelo JS. */
.sheet-root { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.sheet-root[data-open='true'] { pointer-events: auto; }
.sheet-scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .5); opacity: 0; transition: opacity .25s; }
.sheet-root[data-open='true'] .sheet-scrim { opacity: 1; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 600px; margin: 0 auto; height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; box-shadow: 0 -18px 40px -10px rgb(0 0 0 / .35);
  visibility: hidden; transition: height .28s cubic-bezier(.2, .8, .2, 1), visibility 0s .28s;
}
.sheet-root[data-open='true'] .sheet-panel { visibility: visible; transition: height .28s cubic-bezier(.2, .8, .2, 1); }
.sheet-panel.dragging, .sheet-root[data-open='true'] .sheet-panel.dragging { transition: none; }
.sheet-head { flex: none; padding: 0 16px 10px; cursor: grab; }
.sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-panel:not([data-full='true']) .sheet-body { overflow-y: hidden; } /* só rola quando está na altura cheia */

/* alça: zona de toque de 28 px com a pílula de 44×5 px */
.sheet-handle { flex: none; display: grid; place-items: center; height: 28px; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.sheet-handle i { width: 44px; height: 5px; border-radius: 9px; background: var(--muted); opacity: .55; transition: opacity .15s; }
.sheet-handle:hover i, .sheet-handle:focus-visible i { opacity: .85; }
.sheet-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 12px; }
.sheet-handle:active, .sheet-head:active { cursor: grabbing; }

@media (prefers-reduced-motion: reduce) { .sheet-panel, .sheet-root[data-open='true'] .sheet-panel, .sheet-scrim { transition: none; } }

/* confirmação "Apagar tudo?" (dialogs/confirmar-apagar.js): janela curta, uma parada só */
.sh-confirm { z-index: 80; }
.cf-body { padding: 4px 20px calc(24px + var(--safe-b, 0px)); }
.cf-body h2 { margin: 0 0 8px; font: 700 20px/1.2 var(--ui); letter-spacing: -.02em; }
.cf-body p, .cf-body li { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.cf-body ul { margin: 8px 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.cf-body .cf-warn { color: var(--text); font-weight: 600; }
.cf-actions { display: flex; gap: 12px; margin-top: 20px; }
.cf-btn {
  flex: 1 1 0; min-height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--chip-line, var(--line));
  background: var(--chip-bg, var(--s2)); color: var(--text); font: 600 16px var(--ui); cursor: pointer; transition: transform .1s, background .15s;
}
.cf-btn:active { transform: scale(.97); }
.cf-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cf-btn.danger { background: var(--accent); border-color: transparent; color: var(--accent-ink, #fff); }
