/* ===================================
   CALENDARIO DE TRATAMIENTOS HOSPITALIZACIÓN
   Estilo Grid Adaptado de Laboratorio
   =================================== */

:root {
  --hosp-primary: #17a2b8;
  --hosp-success: #28a745;
  --hosp-warning: #ffc107;
  --hosp-danger: #dc3545;
  --hosp-muted: #6c757d;
  --hosp-border: #e0e0e0;
  --hosp-bg-light: #f8f9fa;
}

.agenda-wrapper-hosp {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
}

.agenda-header-hosp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--hosp-border);
}

.agenda-nav-hosp {
  display: flex;
  gap: 8px;
}

.agenda-nav-btn-hosp {
  padding: 6px 15px;
  border-radius: 5px;
  font-weight: 600;
  transition: all 0.2s;
}

.agenda-grid-container-hosp {
  overflow-x: auto;
  border: 1px solid var(--hosp-border);
  border-radius: 8px;
}

.agenda-grid-hosp {
  display: grid;
  grid-template-columns: 80px repeat(7, minmax(140px, 1fr));
  gap: 1px;
  background: var(--hosp-border);
  min-width: 900px;
}

.agenda-header-dia-hosp {
  background: var(--hosp-primary);
  color: white;
  text-align: center;
  padding: 10px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 5;
}

.agenda-header-dia-hosp.hoy {
  background: var(--hosp-success);
}

.dia-nombre-hosp {
  font-size: 12px;
  text-transform: uppercase;
}
.dia-numero-hosp {
  font-size: 18px;
}

.agenda-hora-label-hosp {
  background: var(--hosp-bg-light);
  padding: 10px;
  text-align: center;
  font-weight: 600;
  color: var(--hosp-muted);
  font-size: 11px;
  border-right: 1px solid var(--hosp-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.agenda-slot-hosp {
  background: white;
  min-height: 50px;
  position: relative;
  padding: 3px;
}

.agenda-slot-hosp:hover {
  background: #f1f8ff;
}

/* Eventos de Tratamiento */
.event-hosp {
  border-radius: 4px;
  padding: 4px 6px;
  margin-bottom: 2px;
  font-size: 10.5px;
  color: white;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-hosp:hover {
  transform: scale(1.02);
  z-index: 10;
}

.status-sin_aplicar {
  background-color: var(--hosp-warning);
  color: #333;
}
.status-aplicado {
  background-color: var(--hosp-success);
}
.status-atrasado {
  background-color: var(--hosp-danger);
}
.status-suspendido {
  background-color: var(--hosp-muted);
}

.spinner-hosp {
  font-size: 2rem;
  color: var(--hosp-primary);
}

/* Indicador de Hora Actual */
.agenda-hora-label-hosp {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.agenda-hora-label-hosp.hora-actual-active-hosp {
  color: var(--hosp-primary);
  font-weight: 700;
  border-right: 2px solid var(--hosp-primary);
  background: rgba(23, 162, 184, 0.2) !important;
}

.agenda-hora-label-hosp.hora-actual-active-hosp::before,
.agenda-hora-label-hosp.hora-actual-active-hosp::after {
  content: "";
  position: absolute;
  left: 50%;
  min-width: 200%;
  min-height: 200%;
  background: var(--hosp-bg-light);
  animation: wave-rotate 10s linear infinite;
  border-radius: 45%;
  bottom: var(--fill-percentage);
  transform: translateX(-50%);
  z-index: -1;
}

.agenda-hora-label-hosp.hora-actual-active-hosp::after {
  min-width: 210%;
  min-height: 210%;
  border-radius: 40%;
  animation: wave-rotate 15s linear infinite;
  opacity: 0.5;
}

@keyframes wave-rotate {
  0% {
    transform: translateX(-50%) rotate(0deg);
  }
  100% {
    transform: translateX(-50%) rotate(360deg);
  }
}

.hora-actual-line-hosp {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ea4335;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(234, 67, 53, 0.6);
}

.hora-actual-line-hosp::before {
  content: "";
  position: absolute;
  left: -6px;
  top: -5px;
  width: 12px;
  height: 12px;
  background: #ea4335;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(234, 67, 53, 0.8);
}

.hora-actual-badge-hosp {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #ea4335;
  color: white;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  z-index: 101;
}
