/* ── Guest List Container ── */
.sz-guests-wrap { padding: 24px; }

/* ── Tag (group labels) ── */
.sz-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 12px; font-weight: 500;
  background: var(--paper-deep); color: var(--ink-soft);
}

/* ── Stats Cards ── */
.sz-guests-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.sz-guests-stat {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 16px; text-align: center;
}
.sz-guests-stat__value { font-size: 28px; font-weight: 700; color: var(--gold); }
.sz-guests-stat__label { font-size: 12px; color: var(--fg-muted); margin-top: 4px; }

/* ── Toolbar ── */
.sz-guests-toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.sz-guests-search {
  flex: 1; min-width: 200px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px;
}
.sz-guests-filter {
  padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; background: var(--bg-surface);
}

/* ── Table Container ── */
.sz-guests-table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: 8px;
}

/* ── Table ── */
.sz-guests-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
  min-width: 640px;
}
.sz-guests-table th {
  background: var(--bg-surface); border-bottom: 2px solid var(--border);
  padding: 10px 12px; text-align: left; font-weight: 600;
  position: sticky; top: 0; z-index: 5;
}
.sz-guests-table td {
  border-bottom: 1px solid var(--border); padding: 8px 12px;
  transition: background 0.15s;
}

/* ── Clickable Row ── */
.sz-guest-row { cursor: pointer; }
.sz-guest-row:hover td { background: var(--paper-deep); }

/* ── Row States ── */
.sz-guests-table tr.is-selected td { background: rgba(201, 169, 110, 0.08); }

/* ── RSVP Badges ── */
.sz-rsvp-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 500;
}
.sz-rsvp-badge--confirmed { background: #E8F5E9; color: #2E7D32; }
.sz-rsvp-badge--pending { background: #FFF3E0; color: #E65100; }
.sz-rsvp-badge--declined { background: #FFEBEE; color: #C62828; }

/* ── Bulk Actions Bar ── */
.sz-guests-bulk {
  display: none; position: fixed; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: 50%;
  transform: translateX(-50%); background: var(--ink); color: white;
  padding: 12px 24px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 100; gap: 12px; align-items: center;
}
.sz-guests-bulk.is-visible { display: flex; }
/* En móvil flota por encima de la barra inferior fija */
@media (max-width: 768px) {
  .sz-guests-bulk { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
.sz-guests-bulk__count { font-weight: 600; }
.sz-guests-bulk__btn {
  background: transparent; border: 1px solid rgba(255,255,255,0.3);
  color: white; padding: 6px 12px; border-radius: 6px; cursor: pointer;
  font-size: 13px;
}
.sz-guests-bulk__btn:hover { background: rgba(255,255,255,0.1); }
.sz-guests-bulk__btn--danger { border-color: #ef4444; color: #ef4444; }

/* ── Import Modal ── */
.sz-import-preview {
  max-height: 400px; overflow-y: auto; margin: 16px 0;
}
.sz-import-preview table { width: 100%; font-size: 13px; }
.sz-import-preview tr.is-duplicate { background: #FFF3E0; }
.sz-import-preview tr.is-error { background: #FFEBEE; }

/* ── Empty State ── */
.sz-guests-empty {
  text-align: center; padding: 60px 20px;
}
.sz-guests-empty__title { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.sz-guests-empty__text { font-size: 14px; color: var(--fg-muted); margin-bottom: 24px; }

/* ── Actions row ── */
.sz-guests-actions { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; }
.sz-guests-actions .sz-btn { flex: 1; justify-content: center; }

/* ── Modal Actions ── */
.sz-guest-modal-actions {
  display: flex; gap: 8px;
  margin-top: 16px;
}
.sz-btn--full { flex: 1; justify-content: center; }

/* ── Tablet (iPad) ── */
/* Oculta solo Comida (7) y Acompañantes (8); la columna de acciones (9) debe
   seguir visible para poder eliminar invitados desde la tabla en iPad. */
@media (max-width: 1024px) {
  .sz-guests-table th:nth-child(7),
  .sz-guests-table td:nth-child(7),
  .sz-guests-table th:nth-child(8),
  .sz-guests-table td:nth-child(8) { display: none; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .sz-guests-wrap { padding: 16px; }
  .sz-guests-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .sz-guests-toolbar { flex-direction: column; }
  .sz-guests-search { min-width: 100%; }
  .sz-guests-filter { width: 100%; }
  .sz-guests-table-wrap { border: none; border-radius: 0; }
  .sz-guests-table { font-size: 13px; min-width: 0; }
  /* Oculta checkbox(1), email(3), teléfono(4), comida(7), acompañantes(8).
     Quedan visibles Nombre(2), Grupo(5), RSVP(6) y Acciones(9). */
  .sz-guests-table th:nth-child(1),
  .sz-guests-table td:nth-child(1),
  .sz-guests-table th:nth-child(3),
  .sz-guests-table td:nth-child(3),
  .sz-guests-table th:nth-child(4),
  .sz-guests-table td:nth-child(4),
  .sz-guests-table th:nth-child(7),
  .sz-guests-table td:nth-child(7),
  .sz-guests-table th:nth-child(8),
  .sz-guests-table td:nth-child(8) { display: none; }
  .sz-guests-actions { flex-direction: column; }
  .sz-guests-actions .sz-btn { width: 100%; justify-content: center; }
}

/* ── Small mobile ── */
@media (max-width: 480px) {
  .sz-guests-stats { grid-template-columns: 1fr 1fr; gap: 6px; }
  .sz-guests-stat { padding: 12px 8px; }
  .sz-guests-stat__value { font-size: 22px; }
}

/* ── Companions editor (guest form) ── */
.sz-companions__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.sz-companions__row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}
.sz-companions__row .sz-input {
  margin: 0;
}
.sz-companions__remove {
  color: var(--fg-muted);
}
.sz-companions__remove:hover {
  color: var(--danger, #c0392b);
}
