/* Estilos Modernos para el Widget de Disponibilidad Inca Trail - Andean Life */

:root {
  --al-brand: #7dd532;
  --al-brand-dark: #5fa824;
  --al-dark: #1f2937;
  --al-gray-bg: #f9fafb;
  --al-success: #10b981;
  --al-success-bg: #ecfdf5;
  --al-success-border: #a7f3d0;
  --al-warning: #f59e0b;
  --al-warning-bg: #fffbe6;
  --al-warning-border: #fde68a;
  --al-danger: #ef4444;
  --al-danger-bg: #fef2f2;
  --al-danger-border: #fecaca;
  --al-border: #e5e7eb;
  --al-radius: 14px;
}

.al-availability-container {
  max-width: 900px;
  margin: 20px auto;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background: #ffffff;
  border-radius: var(--al-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--al-border);
  padding: 24px;
  box-sizing: border-box;
}

.al-header-section {
  text-align: center;
  margin-bottom: 24px;
}

.al-header-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--al-dark);
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.al-header-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* Tabs de Tours */
.al-tour-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.al-tab-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--al-border);
  background: #f3f4f6;
  color: var(--al-dark);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.al-tab-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.al-tab-btn.active {
  background: var(--al-brand-dark);
  color: #ffffff;
  border-color: var(--al-brand-dark);
  box-shadow: 0 4px 12px rgba(95, 168, 36, 0.3);
}

/* Controles de Navegación */
.al-nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--al-gray-bg);
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 18px;
  border: 1px solid #f0f0f0;
}

.al-month-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--al-dark);
}

.al-select-group {
  display: flex;
  gap: 8px;
}

.al-select {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--al-border);
  background: #ffffff;
  font-weight: 600;
  font-size: 13px;
  color: var(--al-dark);
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.al-select:hover {
  border-color: #9ca3af;
}

/* Cabecera de Días */
.al-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 700;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding: 6px 0;
  background: #f9fafb;
  border-radius: 6px;
}

/* Grilla del Calendario */
.al-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  position: relative;
  min-height: 280px;
}

/* Tarjeta de Día */
.al-day-card {
  min-height: 80px;
  border-radius: 10px;
  border: 1px solid var(--al-border);
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  background: #ffffff;
  box-sizing: border-box;
}

.al-day-card.empty {
  visibility: hidden;
  border: none;
}

.al-day-number {
  font-size: 14px;
  font-weight: 800;
  color: var(--al-dark);
  align-self: flex-start;
  line-height: 1;
}

.al-day-cupos {
  font-size: 16px;
  font-weight: 900;
  margin: 4px 0;
  line-height: 1;
}

/* Estados */
/* Verde - Disponible */
.al-day-card.green {
  background: var(--al-success-bg);
  border-color: var(--al-success-border);
}

.al-day-card.green:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.2);
}

.al-day-card.green .al-day-cupos {
  color: #059669;
}

/* Naranja - Últimos Cupos */
.al-day-card.orange {
  background: var(--al-warning-bg);
  border-color: var(--al-warning-border);
}

.al-day-card.orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.2);
}

.al-day-card.orange .al-day-cupos {
  color: #d97706;
}

/* Rojo - Agotado */
.al-day-card.red {
  background: var(--al-danger-bg);
  border-color: var(--al-danger-border);
  opacity: 0.85;
}

.al-day-card.red .al-day-cupos {
  color: #dc2626;
}

/* Botones de Reserva y Estado */
.al-btn-book {
  display: block;
  width: 100%;
  padding: 4px 0;
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
  box-sizing: border-box;
}

.al-day-card.green .al-btn-book {
  background: #10b981;
  color: #ffffff;
}

.al-day-card.green .al-btn-book:hover {
  background: #059669;
}

.al-day-card.orange .al-btn-book {
  background: #f59e0b;
  color: #ffffff;
}

.al-day-card.orange .al-btn-book:hover {
  background: #d97706;
}

.al-btn-closed {
  display: block;
  width: 100%;
  padding: 4px 0;
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  background: #fee2e2;
  color: #991b1b;
  box-sizing: border-box;
}

/* Leyenda del Footer */
.al-legend-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--al-border);
  font-size: 13px;
  color: #4b5563;
  flex-wrap: wrap;
  gap: 12px;
}

.al-legend-items {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.al-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

.al-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.al-legend-dot.green {
  background: #10b981;
}

.al-legend-dot.orange {
  background: #f59e0b;
}

.al-legend-dot.red {
  background: #ef4444;
}

#al-updated-time {
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

/* Overlay de Carga */
.al-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--al-radius);
  z-index: 10;
  font-weight: 700;
  font-size: 14px;
  color: var(--al-dark);
}

/* Responsive */
@media (max-width: 640px) {
  .al-availability-container {
    padding: 14px;
  }

  .al-calendar-grid {
    gap: 4px;
  }

  .al-day-card {
    min-height: 65px;
    padding: 4px 2px;
  }

  .al-day-number {
    font-size: 12px;
  }

  .al-day-cupos {
    font-size: 13px;
  }

  .al-btn-book, .al-btn-closed {
    font-size: 9px;
    padding: 2px 0;
  }

  .al-legend-items {
    gap: 10px;
  }

  .al-legend-item {
    font-size: 11px;
  }
}
