/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

.parrafo-fecha {
  font-size: 0.9rem;
  color: #ff4d4d; /* Color rojo para destacar el mensaje */
  text-align: center;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 10px; /* Espacio entre los botones */
}

.calendar-controls button {
  background: #9B59B6; /* Fondo violeta */
  border: none;
  color: #fff; /* Texto blanco */
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 25px; /* Bordes redondeados */
  transition: all 0.3s ease;
}

.calendar-controls button:hover {
  background: #8e44ad; /* Cambio de color al pasar el mouse */
  transform: scale(1.05); /* Efecto de agrandamiento */
}

.year-selector {
  position: relative;
  flex-grow: 1;
  text-align: center;
}

.month-year {
  background: #9B59B6; /* Fondo violeta */
  border: none;
  color: #fff; /* Texto blanco */
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 25px; /* Bordes redondeados */
  transition: all 0.3s ease;
  display: inline-block;
}

.month-year:hover {
  background: #8e44ad; /* Cambio de color al pasar el mouse */
  transform: scale(1.05); /* Efecto de agrandamiento */
}

.year-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  list-style: none;
  padding: 10px 0;
  margin-top: 5px;
  z-index: 10;
  width: 150px;
  text-align: center;
  display: none; /* Oculto por defecto */
}

.year-menu.hidden {
  display: none;
}

.year-menu li {
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.year-menu li:hover {
  background: #f2f2f2;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  text-align: center;
}

.calendar-days div {
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
  transition: background 0.3s ease;
}

.calendar-days div.inactive {
  color: #aaa;
  pointer-events: none;
}

.calendar-days div.active {
  background: #9B59B6;
  color: #fff;
}

.calendar-days div:hover:not(.inactive):not(.active):not(.unavailable) {
  background: #f2f2f2;
}

.calendar-days div.unavailable {
  background: #ff4d4d; /* Fondo rojo */
  color: #fff; /* Texto blanco */
  border-radius: 5px;
}

.calendar-days div.unavailable:hover {
  background: #ff6666; /* Cambio de color al pasar el mouse */
}



/* Media Queries para dispositivos móviles */
@media (max-width: 768px) {
  .calendar-controls button {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  .month-year {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  .calendar-days div {
    font-size: 0.9rem;
    padding: 8px;
  }
}

/* Media Queries para pantallas muy pequeñas */
@media (max-width: 480px) {
  .calendar-controls button {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
  .month-year {
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  .calendar-days div {
    font-size: 0.8rem;
    padding: 6px;
  }
}

/* Añade al final del archivo */
/* --------------------------- */
/* Contenedor principal del calendario */
.calendar-wrapper {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
}

/* Encabezados de días (Lu, Ma, Mi...) */
.calendar-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.day-header {
  text-align: center;
  font-weight: 600;
  color: #0362b6;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 5px;
  font-size: 0.9em;
}

/* Ajustes esenciales para días del mes */
.calendar-days div {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dee2e6;
}

/* Días domingos (opcional) */
.calendar-days div:nth-child(7n+1) {
  color: #f33838;
  font-weight: bold;
}

/* Días sábados (opcional) */
.calendar-days div:nth-child(7n) {
  color: #198754;
  font-weight: bold;
}

/* Asegurar altura mínima en móviles */
@media (max-width: 480px) {
  .calendar-days div {
    min-height: 35px;
    padding: 4px !important;
  }
}