/* ═══════════════════════════════════════════════════════════════════
   Reservas — Acciones, Modales, Blade Historial
   Sprint 2.4c · LUZOcrm V2 · TRANSED ONG
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens locales (heredados del root ya definido en reservas.css) ── */

/* ── Modal helpers ──────────────────────────────────────────────────── */
.rs-modal-lbl {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-muted, #64748b);
}
.rs-modal-lbl--mt { margin-top: 14px; }
.rs-modal-val {
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
}
.rs-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: .5px solid var(--border, #e2e8f0);
  margin-bottom: 4px;
}
.rs-req { color: #dc2626; }

/* Select dentro de modal */
.rs-select-wrap { margin-top: 6px; }
.rs-modal-select {
  width: 100%;
  height: 36px;
  border: .5px solid var(--border, #e2e8f0);
  border-radius: 7px;
  background: var(--bg-card, #fff);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.rs-modal-select:focus { border-color: var(--c-brand, #6d28d9); }

.rs-modal-textarea {
  width: 100%;
  margin-top: 6px;
  border: .5px solid var(--border, #e2e8f0);
  border-radius: 7px;
  background: var(--bg-card, #fff);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 72px;
  box-sizing: border-box;
}
.rs-modal-textarea:focus { border-color: var(--c-brand, #6d28d9); }

.rs-modal-input {
  display: block;
  width: 100%;
  height: 36px;
  border: .5px solid var(--border, #e2e8f0);
  border-radius: 7px;
  background: var(--bg-card, #fff);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
  font-family: inherit;
  outline: none;
  margin-top: 6px;
  box-sizing: border-box;
}
.rs-modal-input:focus { border-color: var(--c-brand, #6d28d9); }

/* ── Modal buttons ─────────────────────────────────────────────────── */
.rs-mb {
  height: 34px;
  padding: 0 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  border: none;
  transition: filter .15s;
}
.rs-mb:disabled { opacity: .45; cursor: not-allowed; }
.rs-mb-cancel  { background: var(--bg-surface, #f8fafc); color: var(--tx-base, #0f172a); border: .5px solid var(--border, #e2e8f0); }
.rs-mb-cancel:hover:not(:disabled)  { background: var(--bg-body, #f1f5f9); }
.rs-mb-confirm { background: var(--c-brand, #6d28d9); color: #fff; }
.rs-mb-confirm:hover:not(:disabled) { filter: brightness(.9); }
.rs-mb-danger  { background: #dc2626; color: #fff; }
.rs-mb-danger:hover:not(:disabled)  { filter: brightness(.9); }
.rs-mb-amber   { background: #b45309; color: #fff; }
.rs-mb-amber:hover:not(:disabled)   { filter: brightness(.9); }

/* ── Estados verticales (cambiar estado) ──────────────────────────── */
.rs-estado-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
}
.rs-estado-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 7px;
  border: .5px solid var(--border, #e2e8f0);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
  transition: background .1s, border-color .1s;
  user-select: none;
}
.rs-estado-opt:hover { background: var(--bg-surface, #f8fafc); }
.rs-estado-opt--active {
  background: rgba(109, 40, 217, .08);
  border-color: rgba(109, 40, 217, .35);
  color: var(--c-brand, #6d28d9);
}
.rs-estado-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Banner amber (cancelación profesional) ───────────────────────── */
.rs-banner-amber {
  padding: 10px 14px;
  border-radius: 7px;
  background: rgba(180, 83, 9, .08);
  border: .5px solid rgba(180, 83, 9, .3);
  color: #92400e;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 14px;
}

/* ── Prof picker (cambiar profesional) ────────────────────────────── */
.rs-prof-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
}
.rs-prof-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: .5px solid var(--border, #e2e8f0);
  cursor: pointer;
  transition: background .1s, border-color .1s;
}
.rs-prof-row:hover { background: var(--bg-surface, #f8fafc); }
.rs-prof-row--active {
  background: rgba(109, 40, 217, .08);
  border-color: rgba(109, 40, 217, .35);
}

/* Avatares */
.rs-prof-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.rs-prof-avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-surface, #f8fafc);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; color: var(--tx-base, #0f172a);
  position: relative; z-index: 2;
  overflow: hidden;
}
.rs-av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.rs-av-ini { font-size: 12px; font-weight: 500; }

/* Halos — solo radial-gradient glow, nunca border/box-shadow sólido */
.rs-halo-green::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,211,153,.55) 0%, rgba(52,211,153,0) 65%);
  z-index: 1;
  pointer-events: none;
  animation: rsHaloPulse 2.4s ease-in-out infinite;
}
.rs-halo-amber::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,.55) 0%, rgba(251,191,36,0) 65%);
  z-index: 1;
  pointer-events: none;
}
@keyframes rsHaloPulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.06); }
}

/* Prof info */
.rs-prof-info   { flex: 1; min-width: 0; }
.rs-prof-nom    { font-size: 12px; font-weight: 500; color: var(--tx-base, #0f172a); }
.rs-prof-esp    { font-size: 11px; color: var(--tx-muted, #64748b); margin-top: 1px; }
.rs-prof-disp   { font-size: 10px; margin-top: 2px; }
.rs-prof-disp--ok   { color: #16a34a; }
.rs-prof-disp--prox { color: #b45309; }

.rs-prof-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--tx-muted, #64748b);
}

/* ── Reagendar — slots ─────────────────────────────────────────────── */
.rs-slots-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  min-height: 36px;
  align-items: flex-start;
}
.rs-slots-hint {
  font-size: 12px;
  color: var(--tx-muted, #64748b);
  padding: 6px 0;
}
.rs-slots-hint--err { color: #dc2626; }
.rs-slot-chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 20px;
  border: .5px solid var(--border, #e2e8f0);
  background: var(--bg-surface, #f8fafc);
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
  cursor: pointer;
  transition: background .1s, border-color .1s;
  font-family: inherit;
}
.rs-slot-chip:hover { border-color: var(--c-brand, #6d28d9); }
.rs-slot-chip--active {
  background: rgba(109, 40, 217, .1);
  border-color: var(--c-brand, #6d28d9);
  color: var(--c-brand, #6d28d9);
}

/* Modalidad toggle */
.rs-toggle-group {
  display: flex;
  border: .5px solid var(--border, #e2e8f0);
  border-radius: 7px;
  overflow: hidden;
  margin-top: 6px;
}
.rs-toggle-btn {
  flex: 1;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--tx-muted, #64748b);
  font-family: inherit;
  transition: background .15s, color .15s;
}
.rs-toggle-btn + .rs-toggle-btn { border-left: .5px solid var(--border, #e2e8f0); }
.rs-toggle-btn--active {
  background: rgba(109, 40, 217, .08);
  color: var(--c-brand, #6d28d9);
}

/* ── Blade historial ───────────────────────────────────────────────── */
.rs-blade-historial {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  height: 100vh;
  background: var(--bg-card, #fff);
  border-left: .5px solid var(--border, #e2e8f0);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .1);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.22,.68,0,1.2);
}
.rs-blade-historial--open { transform: translateX(0); }

.rs-blade-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: .5px solid var(--border, #e2e8f0);
  flex-shrink: 0;
}
.rs-blade-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
}
.rs-blade-folio {
  font-size: 11px;
  color: var(--tx-muted, #64748b);
  margin-top: 2px;
}
.rs-blade-close {
  width: 28px; height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  color: var(--tx-muted, #64748b);
  transition: background .1s;
  flex-shrink: 0;
  padding: 0;
}
.rs-blade-close:hover { background: var(--bg-surface, #f8fafc); }
.rs-blade-close svg   { stroke: currentColor; fill: none; }

.rs-blade-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.rs-blade-loading {
  font-size: 13px;
  color: var(--tx-muted, #64748b);
  padding: 24px 0;
}
.rs-blade-empty {
  font-size: 13px;
  color: var(--tx-muted, #64748b);
  padding: 24px 0;
  text-align: center;
}
.rs-blade-empty--err { color: #dc2626; }

.rs-blade-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: .5px solid var(--border, #e2e8f0);
  flex-shrink: 0;
}
.rs-blade-count { font-size: 11px; color: var(--tx-muted, #64748b); }

/* ── Timeline ──────────────────────────────────────────────────────── */
.rs-timeline { display: flex; flex-direction: column; gap: 0; }
.rs-tl-item {
  display: flex;
  gap: 12px;
  padding-bottom: 18px;
  position: relative;
}
.rs-tl-item::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--border, #e2e8f0);
}
.rs-tl-item:last-child::before { display: none; }
.rs-tl-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}
.rs-tl-content  { flex: 1; min-width: 0; }
.rs-tl-title    { font-size: 12px; font-weight: 500; color: var(--tx-base, #0f172a); }
.rs-tl-meta     { font-size: 11px; color: var(--tx-muted, #64748b); margin-top: 2px; }
.rs-tl-detail   { font-size: 11px; color: var(--tx-muted, #64748b); margin-top: 4px; line-height: 1.5; }

/* ── Botón Columnas en topbar ──────────────────────────────────────── */
#lz-reservas-root .rs-btn-cols {
  height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: .5px solid var(--border, #e2e8f0);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-muted, #64748b);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background .1s, color .1s;
}
#lz-reservas-root .rs-btn-cols:hover {
  background: var(--bg-surface, #f8fafc);
  color: var(--tx-base, #0f172a);
}
#lz-reservas-root .rs-btn-cols svg { stroke: currentColor; fill: none; }

/* ── Columnas toggle modal ─────────────────────────────────────────── */
.rs-col-toggle-list { display: flex; flex-direction: column; gap: 4px; }
.rs-col-toggle-row  {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--tx-base, #0f172a);
  transition: background .1s;
}
.rs-col-toggle-row:hover { background: var(--bg-surface, #f8fafc); }
.rs-col-cb { accent-color: var(--c-brand, #6d28d9); width: 14px; height: 14px; cursor: pointer; }

/* ── Col resize handle ─────────────────────────────────────────────── */
.rs-col-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  transition: background .15s;
  z-index: 5;
}
.rs-col-resize-handle:hover { background: var(--c-brand, #6d28d9); opacity: .4; }

/* ── Link button ───────────────────────────────────────────────────── */
.rs-link-btn {
  background: none;
  border: none;
  color: var(--c-brand, #6d28d9);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
.rs-link-btn:hover { opacity: .75; }

/* ── Blade wrapper profs fullscreen ─────────────────────────────────── */
.rs-blade-profs-wrap { padding: 16px; }
