/* =========================
   CALENDARIO TIPO BOOKING
   Paleta: fondo #F6E9D7 / cards #FFF6EA / bordes #E6D8C6
   Accent: #F28C38 / Texto: #1E4E6D
   ========================= */

.cal-booking {
  background: #FFF6EA;
  border: 1px solid #E6D8C6;
  border-radius: 10px;
  padding: 14px;
}

.titulo-disponibilidad {
  scroll-margin-top: 16px;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.cal-title {
  font-weight: 700;
  color: #1E4E6D;
}

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

.cal-nav button {
  width: auto;
  padding: 10px 12px;
  border-radius: 6px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;
  font-weight: 700;
  color: #1E4E6D;
  font-size: 14px;
}

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

.cal-day {
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y; /* permite desplazar la página sin seleccionar fechas */

  background: #fff;
  border: 1px solid #E6D8C6;
  border-radius: 6px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1E4E6D;
  cursor: pointer;
  transition: transform 0.05s ease, border-color 0.15s ease, filter 0.15s ease;
}

.cal-day:hover {
  border-color: #F28C38;
  filter: brightness(0.99);
}

.cal-day.is-empty {
  background: transparent;
  border-color: transparent;
}

.cal-day.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* selección */
.cal-day.is-in-range {
  background: #F2E4D2;
}

.cal-day.is-range-start,
.cal-day.is-range-end {
  background: #F28C38;
  color: #fff;
  border-color: #F28C38;
}

/* helper: fila de botones */
.btn-row {
  display: flex;
  gap: 12px;
}

.btn-row .btn {
  width: 100%;
}

.cal-selection-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.cal-saved-actions {
  display: none;
}

@media (max-width: 520px) {
  .cal-continue-original {
    display: none;
  }

  .cal-weekdays,
  .cal-grid {
    gap: 8px;
  }
  .cal-day {
    min-height: 42px;
  }

  .cal-actions {
    position: fixed;
    left: 50%;
    bottom: max(8px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 552px;
    z-index: 20;
    padding: 8px;
    background: rgba(255, 246, 234, 0.96);
    border: 1px solid #E6D8C6;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(30, 78, 109, 0.16);
  }

  .cal-actions.is-saved .cal-selection-actions {
    display: none;
  }

  .cal-actions.is-saved .cal-saved-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .cal-saved-message {
    color: #1E4E6D;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
  }
}
