/* ===== CALENDARIO PERSONALIZADO ESTILO FLYBONDI ===== */

.calendar-container {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  margin-bottom: 0;
}

.calendar-header {
  text-align: center;
  margin-bottom: 2px;
}

.calendar-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 1px;
}

.calendar-subtitle {
  font-size: 11px;
  color: #666;
  margin-bottom: 2px;
}

/* Navegación de meses */
.calendar-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding: 0;
}

.nav-button {
  background: transparent;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #666;
}

.nav-button:hover {
  border-color: #fdbe02;
  color: #fdbe02;
  background: #fffbf0;
}

.nav-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: #e5e7eb;
  color: #666;
}

.nav-button:disabled:hover {
  background: transparent;
}

.current-month {
  font-size: 16px;
  font-weight: 700;
  color: #1a202c;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Grid de calendarios */
.calendars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  justify-items: stretch;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

.month-calendar {
  flex: 1;
  width: 100%;
  max-width: 100%;
}

.month-header {
  text-align: center;
  margin-bottom: 2px;
}

.month-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tabla del calendario */
.calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  padding: 0;
  width: 100%;
}

.weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  padding: 5px 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 6px;
  column-gap: 6px;
  padding: 0;
  width: 100%;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  border: 2px solid #e5e7eb;
  min-height: 42px;
  max-height: 42px;
  width: 100%;
  color: #1a202c;
}

.calendar-day:hover:not(.disabled):not(.outside) {
  background: #fffbf0;
  border-color: #fdbe02;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(253, 190, 2, 0.2);
}

/* Número del día */
.day-number {
  font-size: 16px;
  font-weight: 500;
  color: #111;
  margin-bottom: 3px;
}

/* Días deshabilitados */
.calendar-day.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: #fafafa;
  border-color: #f0f0f0;
  color: #cbd5e0;
}

.calendar-day.disabled .day-number {
  color: #9ca3af;
}

/* Días fuera del mes actual */
.calendar-day.outside {
  opacity: 0;
  pointer-events: none;
}

/* Día de hoy */
.calendar-day.today {
  background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
  border-color: #fdbe02;
  border-width: 2px;
  font-weight: 700;
  color: #fdbe02;
  box-shadow: 0 2px 8px rgba(253, 190, 2, 0.2);
}

/* Día seleccionado (inicio de rango) */
.calendar-day.selected-start {
  background: linear-gradient(135deg, #fdbe02 0%, #f59e0b 100%);
  border-color: #fdbe02;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(253, 190, 2, 0.3);
  transform: scale(1.02);
}

/* Día seleccionado (fin de rango) */
.calendar-day.selected-end {
  background: #fdbe02;
  border-color: #fdbe02;
  border-radius: 0 8px 8px 0;
}

.calendar-day.selected-end .day-number {
  color: white;
  font-weight: 700;
}

/* Día seleccionado (único o ambos inicio y fin) */
.calendar-day.selected-start.selected-end {
  border-radius: 8px;
}

/* Días en el rango */
.calendar-day.in-range {
  background: #fffbf0;
  border-color: transparent;
  border-radius: 0;
}

.calendar-day.in-range .day-number {
  color: #333;
}

/* Información adicional */
.day-info {
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}

.calendar-day.selected-start .day-info,
.calendar-day.selected-end .day-info {
  color: white;
}

/* Footer del calendario */
.calendar-footer {
  display: none;
}

.selected-range-info {
  font-size: 14px;
  color: #666;
}

.selected-range-info strong {
  color: #333;
  font-weight: 600;
}

.calendar-actions {
  display: flex;
  gap: 12px;
}

.btn-calendar {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.btn-clear {
  background: #f3f4f6;
  color: #666;
}

.btn-clear:hover {
  background: #e5e7eb;
}

.btn-apply {
  background: #fdbe02;
  color: #333;
}

.btn-apply:hover {
  background: #e5ab02;
}

.btn-apply:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 968px) {
  .calendar-container {
    padding: 15px;
  }

  .calendar-navigation {
    padding: 0;
  }
}

@media (max-width: 640px) {
  .calendar-days {
    column-gap: 2px;
    row-gap: 4px;
  }

  .calendar-weekdays {
    gap: 2px;
  }

  .calendar-day {
    min-height: 42px;
    max-height: 42px;
    padding: 4px 2px;
    font-size: 13px;
  }

  .day-number {
    font-size: 13px;
  }

  .day-info {
    font-size: 9px;
  }

  .weekday {
    font-size: 10px;
    padding: 4px 2px;
  }

  .calendar-footer {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

  .calendar-actions {
    width: 100%;
  }

  .btn-calendar {
    flex: 1;
  }
}
