/* Estilos para el Calendario Avanzado */

.calendar-widget {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

.calendar-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

/* Cabecera con días de la semana (calendario-actividades.html) */
.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--primary, #1418c4);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

/* Cabecera con controles de navegación y filtros (calendario-evaluaciones.html) */
.calendar-widget .calendar-header {
  display: block;
  background: transparent;
  border-radius: 0;
  margin-bottom: 1rem;
  gap: 0;
  overflow: visible;
}

.calendar-day-name {
  background: var(--primary, #1418c4);
  color: white;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.calendar-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: #e2e8f0;
  border: 1px solid #e2e8f0;
  border-top: none;
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

/* Contenedor del grid del calendario (calendario-actividades.html) */
.calendar-grid {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

/* Grid para calendario-evaluaciones.html */
.calendar-widget .calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e5e7eb;
  padding: 1px;
}

.calendar-day-header {
  background: var(--primary, #1418c4);
  color: white;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 100px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: white;
  display: flex;
  flex-direction: column;
}

.calendar-day:hover {
  background: #f1f5f9;
  transform: scale(1.02);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.calendar-day.other-month {
  background: #f8fafc;
  color: #94a3b8;
}

.calendar-day.other-month .day-number {
  opacity: 0.5;
}

.calendar-day.today {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 2px solid var(--primary, #1418c4);
}

.calendar-day.today .day-number {
  color: var(--primary, #1418c4);
  font-weight: 700;
}

.calendar-day.has-event::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--aqua, #00d4ff);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.day-number {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.day-activities {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow: hidden;
}

.activity-dot {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}

.activity-dot small {
  font-size: 0.65rem;
  line-height: 1.2;
}

.has-activities {
  border-left: 3px solid var(--aqua, #00d4ff);
}

.event-indicators {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.event-indicators .badge {
  font-size: 0.7rem;
  padding: 2px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.badge-sm {
  font-size: 0.65rem !important;
  padding: 2px 4px !important;
}

/* Lista de eventos del mes */
.activities-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.activity-item {
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.activity-item:hover {
  border-color: var(--primary, #1418c4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 24, 196, 0.15);
}

.list-group-item {
  transition: all 0.2s ease;
  border: 1px solid #e2e8f0;
}

.list-group-item:hover {
  border-color: var(--primary, #1418c4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(20, 24, 196, 0.1);
}

/* Scrollbar personalizada */
.list-group::-webkit-scrollbar {
  width: 6px;
}

.list-group::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.list-group::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.list-group::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
  .calendar-widget, .calendar-container {
    padding: 1rem;
  }
  
  .calendar-day {
    min-height: 80px;
    padding: 0.25rem;
  }
  
  .calendar-day-name {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
  }
  
  .day-number {
    font-size: 0.875rem;
  }
  
  .activity-dot {
    font-size: 0.6rem;
    padding: 1px 4px;
  }
  
  .activity-dot small {
    font-size: 0.6rem;
  }
  
  .event-indicators .badge {
    font-size: 0.6rem;
    padding: 1px 2px;
  }
}

@media (max-width: 576px) {
  .calendar-day {
    min-height: 60px;
    padding: 0.2rem;
  }
  
  .day-number {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .activity-dot {
    font-size: 0.5rem;
    padding: 1px 3px;
  }
  
  .activity-dot small {
    font-size: 0.5rem;
  }
  
  .day-activities small {
    font-size: 0.5rem;
  }
  
  .event-indicators .badge {
    font-size: 0.5rem;
    padding: 1px 2px;
  }
  
  .event-indicators small {
    font-size: 0.5rem;
  }
}

/* Animaciones para carga */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calendar-widget {
  animation: fadeInUp 0.5s ease-out;
}

.list-group-item {
  animation: fadeInUp 0.3s ease-out;
}

.list-group-item:nth-child(odd) {
  animation-delay: 0.05s;
}

.list-group-item:nth-child(even) {
  animation-delay: 0.1s;
}

/* Clase para morado */
.bg-purple {
  background-color: #9333ea !important;
  color: white !important;
}
