/* picker-sheet.css — bottom-sheet primitive for the AssemblyPickerSheet
 * and (Sprint 6+) the 3-step voter selector quick-edit. */

.vc-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: vc-fade-in 160ms ease;
}

.vc-sheet {
  position: fixed;
  z-index: 51;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 480px;
  background: var(--vc-bg-elevated);
  border-top-left-radius: var(--vc-radius-lg);
  border-top-right-radius: var(--vc-radius-lg);
  border-top: 1px solid var(--vc-border);
  box-shadow: var(--vc-shadow-lg);
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0));
  max-height: 80vh;
  overflow-y: auto;
  animation: vc-slide-up 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.vc-sheet__handle {
  display: block;
  width: 36px;
  height: 4px;
  margin: 2px auto 8px;
  background: var(--vc-border-strong);
  border-radius: 2px;
}

.vc-sheet__title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--vc-text-muted);
}

/* Compact rows — the picker can list 5–10 owned assemblies on a phone, so the
 * State + Name + Switch label all sit on a single line. ~38px row height.
 * `width: 100%` + `box-sizing: border-box` overrides the <button> default
 * intrinsic width so each row spans the full sheet. */
.vc-sheet__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: var(--vc-bg-surface);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  margin-bottom: 4px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  color: inherit;
  text-decoration: none;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  text-align: left;
}
.vc-sheet__row > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;          /* lets long names truncate instead of pushing the meta off-screen */
  flex: 1;
}
.vc-sheet__row:hover { border-color: var(--vc-primary); background: var(--vc-bg-elevated); }
.vc-sheet__row.active {
  border-color: var(--vc-success);
  /* `--vc-success` is solid; tint to ~18% alpha for the soft fill that
   * matches the existing --vc-primary-soft pattern across all 3 themes. */
  background: color-mix(in srgb, var(--vc-success) 18%, transparent);
}
.vc-sheet__row.active .vc-sheet__row-meta {
  color: var(--vc-success);
  font-weight: 600;
}
.vc-sheet__row-state {
  font-size: 10px;
  color: var(--vc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border: 1px solid var(--vc-border);
  border-radius: 4px;
  flex-shrink: 0;
}
.vc-sheet__row-name {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-sheet__row-meta {
  font-size: 11px;
  color: var(--vc-text-muted);
  flex-shrink: 0;
}

.vc-sheet__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: linear-gradient(120deg, var(--vc-primary), var(--vc-accent));
  color: #fff;
  border: 0;
  border-radius: var(--vc-radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
  width: 100%;
  text-decoration: none;
}

@keyframes vc-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vc-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .vc-sheet, .vc-sheet-backdrop { animation: none; }
}
