/* DEPA-1778690551 · #3 S24D comentario engañoso removido */
/* ═══════════════════════════════════════════════════════════════════
   Reservas — Tabla + Rows
   Sprint 2.4a · LUZOcrm V2 · TRANSED ONG
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tabla contenedor ──────────────────────────────────────────────── */
#lz-reservas-root .rs-list-host {
  min-height: 100%;
}

#lz-reservas-root .rs-table {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ── Columnas — grid compartido thead + rows ───────────────────────── */
#lz-reservas-root .rs-thead,
#lz-reservas-root .rs-row {
  display: grid;
  grid-template-columns:
    32px          /* check    */
    110px         /* folio    */
    110px         /* fecha    */
    70px          /* hora     */
    minmax(180px, 1fr) /* paciente */
    190px         /* prof     */
    90px          /* mod      */
    130px         /* estado   */
    40px;         /* acciones */
  align-items: center;
}

/* ── Thead ─────────────────────────────────────────────────────────── */
#lz-reservas-root .rs-thead {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 36px;
  background: var(--rs-bg2);
  border-bottom: .5px solid var(--rs-border);
}
#lz-reservas-root .rs-thead .rs-col {
  font-size: 11px;
  font-weight: 500;
  color: var(--rs-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
#lz-reservas-root .rs-sortable {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
#lz-reservas-root .rs-sortable:hover { color: var(--rs-accent); }

#lz-reservas-root .rs-sort-icon svg       { stroke: currentColor; fill: none; opacity: .4; }
#lz-reservas-root .rs-sort-icon--active svg { opacity: 1; color: var(--rs-accent); }

/* ── Columnas individuales — padding ─────────────────────────────── */
#lz-reservas-root .rs-col {
  padding: 0 8px;
  overflow: hidden;
}
#lz-reservas-root .rs-col-check   { padding: 0; display: flex; align-items: center; justify-content: center; }
#lz-reservas-root .rs-col-actions { padding: 0; display: flex; align-items: center; justify-content: center; }

/* ── Rows ──────────────────────────────────────────────────────────── */
#lz-reservas-root .rs-tbody {
  display: flex;
  flex-direction: column;
}

#lz-reservas-root .rs-row {
  height: 52px;
  cursor: pointer;
  border-bottom: .5px solid var(--rs-border);
  background: var(--rs-panel);
  transition: background .1s;
}
#lz-reservas-root .rs-row:hover {
  background: var(--rs-bg2);
}
#lz-reservas-root .rs-row[data-selected],
#lz-reservas-root .rs-row.rs-row--selected {
  background: var(--rs-accent-lt);
}

/* ── Checkbox ──────────────────────────────────────────────────────── */
#lz-reservas-root .rs-check {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--rs-accent);
  flex-shrink: 0;
}

/* ── Folio ─────────────────────────────────────────────────────────── */
#lz-reservas-root .rs-folio {
  font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--rs-accent);
  background: var(--rs-accent-lt);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Paciente ──────────────────────────────────────────────────────── */
#lz-reservas-root .rs-pac-nom {
  font-size: 12px;
  font-weight: 500;
  color: var(--rs-tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#lz-reservas-root .rs-pac-rut {
  font-size: 11px;
  color: var(--rs-muted);
  white-space: nowrap;
}

/* ── Modalidad tag ─────────────────────────────────────────────────── */
#lz-reservas-root .rs-mod-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--rs-muted);
  white-space: nowrap;
}
#lz-reservas-root .rs-mod-tag svg { stroke: currentColor; fill: none; }

/* ── Pills de estado ───────────────────────────────────────────────── */
#lz-reservas-root .rs-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

#lz-reservas-root .rs-pill--muted {
  background: var(--rs-bg2);
  color: var(--rs-muted);
  border: .5px solid var(--rs-border);
}
#lz-reservas-root .rs-pill--brand {
  background: var(--rs-accent-lt);
  color: var(--rs-accent);
}
#lz-reservas-root .rs-pill--green {
  background: rgba(22, 163, 74, .1);
  color: var(--rs-green);
}
#lz-reservas-root .rs-pill--amber {
  background: rgba(180, 83, 9, .1);
  color: var(--rs-amber);
}
#lz-reservas-root .rs-pill--red {
  background: rgba(220, 38, 38, .08);
  color: var(--rs-red);
}
#lz-reservas-root .rs-pill--blue {
  background: rgba(37, 99, 235, .1);
  color: var(--rs-blue);
}
#lz-reservas-root .rs-pill--accent {
  background: var(--rs-accent-lt);
  color: var(--rs-accent);
}

/* ── Botón más (⋯) ─────────────────────────────────────────────────── */
#lz-reservas-root .rs-btn-more {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--rs-muted);
  transition: background .1s, color .1s;
  padding: 0;
}
#lz-reservas-root .rs-btn-more:hover {
  background: var(--rs-bg2);
  color: var(--rs-tx);
}
#lz-reservas-root .rs-btn-more svg { stroke: currentColor; fill: none; }

/* ── Skeleton ──────────────────────────────────────────────────────── */
#lz-reservas-root .rs-row--skel {
  cursor: default;
}
#lz-reservas-root .rs-row--skel:hover { background: var(--rs-panel); }

#lz-reservas-root .rs-skel {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg,
    var(--rs-bg2) 25%,
    rgba(0, 0, 0, .04) 50%,
    var(--rs-bg2) 75%);
  background-size: 200% 100%;
  animation: rsShimmer 1.4s infinite;
}
@keyframes rsShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Estado vacío ──────────────────────────────────────────────────── */
#lz-reservas-root .rs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  gap: 10px;
  text-align: center;
}
#lz-reservas-root .rs-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--rs-bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rs-muted);
  margin-bottom: 4px;
}
#lz-reservas-root .rs-empty-icon svg { stroke: currentColor; fill: none; }
#lz-reservas-root .rs-empty-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--rs-tx);
}
#lz-reservas-root .rs-empty-sub {
  font-size: 12px;
  color: var(--rs-muted);
  max-width: 280px;
  line-height: 1.5;
}
#lz-reservas-root .rs-empty-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

/* ── Texto columnas genérico ────────────────────────────────────────── */
#lz-reservas-root .rs-col {
  font-size: 12px;
  font-weight: 500;
  color: var(--rs-tx);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Folio con copy ─────────────────────────────────────────────────── */
#lz-reservas-root .rs-folio-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
#lz-reservas-root .rs-folio-copy {
  width: 20px; height: 20px;
  border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; color: var(--rs-muted, #64748b);
  opacity: 0; transition: opacity .15s;
  padding: 0;
}
#lz-reservas-root .rs-row:hover .rs-folio-copy { opacity: 1; }
#lz-reservas-root .rs-folio-copy:hover { color: var(--c-brand, #6d28d9); background: var(--rs-accent-lt, rgba(109,40,217,.08)); }
#lz-reservas-root .rs-folio-copy svg { stroke: currentColor; fill: none; }

/* ── Prof cell con avatar + halo ────────────────────────────────────── */
#lz-reservas-root .rs-prof-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
#lz-reservas-root .rs-prof-av-wrap {
  position: relative;
  width: 28px; height: 28px;
  flex-shrink: 0;
}
#lz-reservas-root .rs-prof-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500;
  overflow: hidden; position: relative; z-index: 2;
}
#lz-reservas-root .rs-prof-av-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}
#lz-reservas-root .rs-prof-halo::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109,40,217,.45) 0%, rgba(109,40,217,0) 65%);
  z-index: 1;
  pointer-events: none;
}
#lz-reservas-root .rs-prof-name {
  font-size: 12px; font-weight: 500;
  color: var(--tx-base, #0f172a);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Dropdown ancho mínimo ──────────────────────────────────────────── */
.rs-dd-pop {
  min-width: 200px !important;
}

/* ── Folio copy ── */
#lz-reservas-root .rs-folio-wrap { display:flex;align-items:center;gap:5px; }
#lz-reservas-root .rs-folio-copy { width:20px;height:20px;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:4px;color:var(--rs-muted,#64748b);opacity:0;transition:opacity .15s;padding:0; }
#lz-reservas-root .rs-row:hover .rs-folio-copy { opacity:1; }
#lz-reservas-root .rs-folio-copy:hover { color:var(--c-brand,#6d28d9);background:rgba(109,40,217,.08); }
#lz-reservas-root .rs-folio-copy svg { stroke:currentColor;fill:none; }
/* ── Prof avatar + halo ── */
#lz-reservas-root .rs-prof-cell { display:flex;align-items:center;gap:8px;min-width:0; }
#lz-reservas-root .rs-prof-av-wrap { position:relative;width:28px;height:28px;flex-shrink:0; }
#lz-reservas-root .rs-prof-av { width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:500;overflow:hidden;position:relative;z-index:2; }
#lz-reservas-root .rs-prof-av-img { width:100%;height:100%;object-fit:cover;border-radius:50%;display:block; }
#lz-reservas-root .rs-prof-halo::before { content:'';position:absolute;inset:-6px;border-radius:50%;background:radial-gradient(circle,rgba(109,40,217,.45) 0%,rgba(109,40,217,0) 65%);z-index:1;pointer-events:none; }
#lz-reservas-root .rs-prof-name { font-size:12px;font-weight:500;color:var(--tx-base,#0f172a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
/* ── Dropdown ancho ── */
.rs-dd-pop { min-width:200px !important; }

/* ── Zebra stripes ── */
#lz-reservas-root .rs-tbody .rs-row:nth-child(even) { background: var(--bg-surface, #f8fafc); }
#lz-reservas-root .rs-tbody .rs-row:nth-child(even):hover { background: var(--bg-hover, #f1f5f9); }
#lz-reservas-root .rs-tbody .rs-row[data-selected]:nth-child(even) { background: rgba(109,40,217,.08); }
/* ── PXID ── */
#lz-reservas-root .rs-pac-sep { margin: 0 4px; color: var(--tx-muted, #64748b); font-size: 10px; }
#lz-reservas-root .rs-pac-pxid { font-size: 10px; color: var(--tx-dim, #94a3b8); font-family: 'SF Mono','Fira Code',monospace; }


/* DEPA-1778690551 · Hover en filas intensifica el halo */
#lz-reservas-root .rs-row:hover .rs-prof-halo::before {
  background: radial-gradient(circle, rgba(109,40,217,.65) 0%, rgba(109,40,217,0) 70%);
}
