/* ── Cards ── */

/* Nominee card */
.nominee-card {
  container-type: inline-size;
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-md);
  padding: 0;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.nominee-card-body {
  padding: 12px 14px;
}
.nominee-card:has(.card-tab) .nominee-card-body {
  padding: 12px 16px;
}

.nominee-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.nominee-info {
  flex: 1;
  min-width: 0;
}
.nominee-name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  line-height: var(--leading-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.nominee-pronouns {
  font-weight: var(--weight-normal);
  color: var(--color-text-tertiary);
}
.nominee-words {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.nominee-sub {
  font-size: var(--text-xs);
  color: #b0ada5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: var(--space-1);
}

.nominee-action {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  align-items: center;
}
.nominee-action .btn {
  white-space: nowrap;
}

/* Discuss button: full on desktop, icon-only on mobile */
.discuss-btn--icon {
  display: none;
}

/* Expand hint chevron (browse cards) */
.nominee-expand-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0 0;
  margin-left: 52px;
  color: var(--color-text-tertiary);
  line-height: 1;
  transition: color var(--transition-fast);
}
.nominee-expand-text,
.nominee-collapse-text {
  font-size: var(--text-3xs);
  font-weight: var(--weight-medium);
}
.nominee-card:hover .nominee-expand-hint {
  color: var(--color-text-secondary);
}
.nominee-card.is-open .nominee-expand-hint svg {
  transform: rotate(180deg);
}
.nominee-collapse-text {
  display: none;
}
.nominee-card.is-open .nominee-expand-text {
  display: none;
}
.nominee-card.is-open .nominee-collapse-text {
  display: inline;
}
.nominee-expand-hint svg {
  transition: transform var(--transition-normal);
}

/* Picked avatar badge (browse) */
.nominee-avatar-wrap {
  position: relative;
}
.nominee-picked-badge {
  display: none;
}
.nominee-card.is-picked .nominee-picked-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  border-radius: var(--radius-circle);
  border: 2px solid var(--color-white);
}

.nominee-more {
  font-size: var(--text-3xs);
  color: #b0ada5;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  font-family: inherit;
}
.nominee-more:hover { color: var(--color-text-secondary); }

/* Picked state */
.nominee-card.is-picked {
  background: rgba(120, 140, 100, 0.1);
}

/* Selected state */
.nominee-card.is-selected {
  background: var(--color-white);
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

/* Card tab — line-divided stats strip at top of card */
.card-tab {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  color: var(--color-text-tertiary);
  font-size: var(--text-4xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-warm-border);
  line-height: 1.4;
}
.card-tab--selected {
  background: var(--color-accent);
  color: var(--color-white);
  border-bottom-color: var(--color-accent);
}
.nominee-selected-label {
  font-size: var(--text-2xs);
  color: var(--color-sage-dark);
  font-weight: var(--weight-medium);
}

/* Picked label in stats bar */
.picked-label {
  font-size: var(--text-2xs);
  color: var(--color-success);
  font-weight: var(--weight-medium);
}

/* Nominee picked label (browse read-only) */
.nominee-picked-label {
  font-size: var(--text-2xs);
  color: var(--color-accent);
  font-weight: var(--weight-medium);
}

/* Stats bar (bottom row of card in curate) */
.nominee-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-warm-border);
}
.stats-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stats-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.stats-bar-stat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-2xs);
  color: var(--color-text-tertiary);
  white-space: nowrap;
}
.stats-bar-stat i {
  font-size: var(--text-4xs);
}
.stats-bar-chips {
  color: var(--color-accent);
  font-weight: var(--weight-semibold);
}
.stats-bar-sep {
  color: var(--color-surface-hover);
  font-size: 8px;
}

/* Dossier stats bar */
.dossier-stats-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-warm-border);
}

/* Dossier chip action / curate actions */
.dossier-chip-action {
  display: flex;
  align-items: center;
}
.dossier-curate-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

/* Expandable detail */
.nominee-detail {
  display: none;
}
.nominee-card.is-open .nominee-detail {
  display: block;
}
.nominee-detail-inner {
  padding: 10px 0 2px;
  border-top: 1px solid var(--color-warm-border);
  margin-top: 10px;
  margin-left: 52px;
}
.nominee-detail-inner .field-label {
  font-size: var(--text-4xs);
  font-weight: var(--weight-medium);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #b0ada6;
}
.nominee-detail-why {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}
.nominee-detail-contact {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.nominee-detail-contact .field-label {
  margin-bottom: 1px;
}

/* Nominee meta */
.nominee-meta {
  font-size: var(--text-3xs);
  color: #b0ada5;
  margin-top: 1px;
}

/* Ruled out state — fade everything except the Restore button */
.nominee-card.is-ruled-out .nominee-top > :not(.nominee-action),
.nominee-card.is-ruled-out .nominee-stats-bar {
  opacity: 0.35;
}

/* Pick slots (browse) */
.pick-slot {
  background: #fffef9;
  border: none;
  border-radius: 3px;
  padding: 14px;
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-elevated);
  transform: rotate(-0.4deg);
  position: relative;
}
.pick-slot:nth-child(even) {
  transform: rotate(0.3deg);
}
.pick-slot:nth-child(3n) {
  transform: rotate(-0.6deg);
}
.pick-slot.empty {
  background: rgba(0, 0, 0, 0.015);
  padding: 14px;
  display: flex;
  align-items: center;
  box-shadow: none;
  border: 1px dashed var(--color-border-light);
  transform: none;
}
.pick-slot-empty-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-circle);
  border: 1.5px dashed var(--color-border-light);
  flex-shrink: 0;
}
.pick-slot-footnote {
  font-size: var(--text-3xs);
  color: var(--color-text-tertiary);
  text-align: center;
  margin-top: var(--space-2);
}
.pick-slot-header {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pick-slot-header .pick-avatar {
  flex-shrink: 0;
}
.pick-slot-header .pick-name {
  flex: 1;
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
}
.pick-remove { font-size: var(--text-2xs); border: none; background: none; cursor: pointer; color: #b0ada5; padding: var(--space-1); }
.pick-remove:hover { color: var(--color-text-secondary); }

/* Pick note */
.pick-note {
  margin-top: var(--space-3);
}
.pick-note-label {
  display: block;
  font-size: var(--text-3xs);
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
}
.pick-note-input {
  width: 100%;
  min-height: 52px;
  border: 1px dashed var(--color-border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: var(--text-xs);
  font-family: inherit;
  line-height: 1.5;
  resize: none;
  background: transparent;
  color: var(--color-text);
  transition: border var(--transition-fast), background var(--transition-fast);
}
.pick-note-input:focus {
  border: 1px solid var(--color-accent);
  background: var(--color-bg);
  outline: none;
}
.pick-note-input::placeholder {
  color: #b0ada5;
  font-size: var(--text-2xs);
}
.pick-note-input.is-filled {
  border: 1px solid var(--color-surface-hover);
  background: var(--color-bg);
}
.pick-slot.note-missing .pick-note-input {
  outline: 1px solid var(--color-danger);
}

/* ── Mobile voting bottom bar ── */
.vote-bottom-bar {
  display: none; /* shown via media query */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: #fffef9;
  border-top: 1px solid var(--color-warm-border);
  padding: 14px 16px;
  padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 8px));
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.vote-bar-label {
  font-size: var(--text-4xs);
  font-weight: var(--weight-medium);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #b0ada6;
}
.vote-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.vote-bar-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vote-bar-picks {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.vote-bar-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-circle);
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
  overflow: hidden;
}
.vote-bar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-circle);
}
.vote-bar-empty {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-circle);
  border: 1.5px dashed var(--color-border-light);
  flex-shrink: 0;
}
.vote-bar-count {
  font-size: var(--text-2xs);
  color: var(--color-text-tertiary);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}
.vote-bar-ready .vote-bar-count {
  color: var(--color-success);
  font-weight: var(--weight-semibold);
}

/* ── Mobile vote pick modal (slide-up) ── */
.vote-pick-modal {
  display: none; /* shown via media query when opened */
  position: fixed;
  inset: 0;
  z-index: 1000;
  flex-direction: column;
  background: var(--color-bg);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.vote-pick-modal.is-open {
  transform: translateY(0);
}
.vote-pick-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 16px 16px 0;
}
.vote-pick-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.vote-pick-modal-close:hover {
  color: var(--color-text);
}
.vote-pick-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 20px 0;
}
.vote-pick-modal-nominee {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.vote-pick-modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-circle);
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
  overflow: hidden;
}
.vote-pick-modal-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-circle);
}
.vote-pick-modal-name {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
}
.vote-pick-modal-pronouns {
  font-weight: var(--weight-normal);
  color: var(--color-text-tertiary);
}
.vote-pick-modal-sub {
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  margin-top: 2px;
}
.vote-pick-modal-note {
  margin-top: 8px;
  background: #fffef9;
  border-radius: 3px;
  padding: 14px;
  box-shadow: var(--shadow-elevated);
  transform: rotate(-0.4deg);
}
.vote-pick-modal-note label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-bottom: 8px;
  font-weight: var(--weight-medium);
}
.vote-pick-modal-note textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: var(--text-base);
  font-family: inherit;
  line-height: 1.5;
  resize: none;
  background: var(--color-white);
  color: var(--color-text);
}
.vote-pick-modal-note textarea:focus {
  border-color: var(--color-accent);
  outline: none;
}
/* Remaining slots shown in pick modal */
.vote-pick-modal-remaining {
  margin-top: 20px;
}

.vote-pick-modal-footer {
  padding: 16px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--color-warm-border);
  background: var(--color-white);
}

/* ── Mobile finalize modal ── */
.vote-finalize-modal {
  display: none; /* shown via media query when opened */
  position: fixed;
  inset: 0;
  z-index: 1000;
  flex-direction: column;
  background: var(--color-white);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.vote-finalize-modal.is-open {
  transform: translateY(0);
}
.vote-finalize-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}
.vote-finalize-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.vote-finalize-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.vote-finalize-close:hover {
  color: var(--color-text);
}
.vote-finalize-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.vote-finalize-pick {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.vote-finalize-pick-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.vote-finalize-pick-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-circle);
  background: var(--color-accent);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-3xs);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
  overflow: hidden;
}
.vote-finalize-pick-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-circle);
}
.vote-finalize-pick-name {
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
}
.vote-finalize-pick-remove {
  margin-left: auto;
  background: none;
  border: none;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  cursor: pointer;
  padding: 4px;
}
.vote-finalize-pick-remove:hover {
  color: var(--color-danger);
}
.vote-finalize-pick-note textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: var(--text-xs);
  font-family: inherit;
  line-height: 1.5;
  resize: none;
  background: var(--color-bg);
  color: var(--color-text);
}
.vote-finalize-pick-note textarea:focus {
  border-color: var(--color-accent);
  outline: none;
  background: var(--color-white);
}
.vote-finalize-pick-note label {
  display: block;
  font-size: var(--text-3xs);
  color: var(--color-text-tertiary);
  margin-bottom: 6px;
}
.vote-finalize-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-tertiary);
  font-size: var(--text-sm);
}
.vote-finalize-footer {
  padding: 16px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--color-warm-border);
  background: var(--color-white);
}
.vote-note-warning {
  font-size: var(--text-2xs);
  color: var(--color-text-tertiary);
  text-align: center;
}

/* Admin card */
.admin-card {
  background: var(--color-white);
  border-radius: 10px;
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}
