/* sheet.css — the overlay sheet (Add Videos, Settings, confirms), toasts, fields. Hub's, trimmed. */

body.no-scroll { overflow: hidden; }
@keyframes sheetUp  { from { transform: translateY(40px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }

.overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(0, 0, 0, .32); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .2s var(--ease) both;
}
.overlay.is-closing { animation: fadeIn .2s var(--ease) reverse both; }
.sheet {
  width: 100%; max-width: 520px; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden;
  animation: sheetUp .38s var(--spring) both;
}
.overlay.is-closing .sheet { animation: sheetUp .2s var(--ease) reverse both; }
.sheet--sm { max-width: 400px; }
.sheet--lg { max-width: 640px; }
.sheet-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border-2);
}
.sheet-head > :last-child { justify-self: end; }
.sheet-title { font-size: 16px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.sheet-body { padding: 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.sheet-text { color: var(--label-2); }
.link-btn { justify-self: start; background: none; border: none; color: var(--accent); font-size: 16px; cursor: pointer; padding: 2px 0; }
.link-btn:hover { opacity: .75; }
.link-btn--strong { font-weight: 600; }
.link-btn.is-danger { color: var(--red); }
.link-btn:disabled { opacity: .4; cursor: default; }

/* ── Fields ────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--label-2); }
.field input, .field textarea, .search input {
  width: 100%; border: 1px solid transparent; outline: none;
  background: var(--surface-2); border-radius: var(--r-md); padding: 11px 14px; font-size: 16px; color: var(--label);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { resize: vertical; line-height: 1.45; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; }
.field input:focus, .field textarea:focus, .search input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); background: var(--surface);
}
.search { position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--label-3); }
.search input { padding-left: 36px; font-size: 15px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper input { width: 96px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper b { font-size: 16px; font-weight: 500; color: var(--label); }

/* Theme picker: radio chips. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-pick { position: relative; }
.chip-pick input { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.sheet .banner { overflow-wrap: anywhere; }
.chip-pick span {
  display: inline-block; padding: 6px 14px; border-radius: var(--r-full); cursor: pointer;
  background: var(--surface-2); color: var(--label); font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.chip-pick span:hover { background: var(--surface-3); }
.chip-pick input:checked + span { background: var(--accent-fill); color: #fff; }
.chip-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Toast ─────────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translateX(-50%);
  padding: 11px 20px; border-radius: var(--r-full); font-size: 14px; font-weight: 500; max-width: calc(100vw - 32px);
  background: color-mix(in srgb, var(--label) 88%, transparent); color: var(--bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-lg);
  animation: sheetUp .35s var(--spring) both;
}
.toast.is-closing { animation: fadeIn .3s var(--ease) reverse both; }
