/* Estilos de producción 100% calibrados para Autocomplete y Calendario de TiquetesBaratos */

/* Smartbox Dropdowns Container */
.smartbox {
  position: relative;
}
.search__route {
  position: relative;
}
.search__details {
  position: relative;
}

.smartbox__container--desktop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 1050;
  width: 100%;
}
.smartbox__container--right {
  left: auto;
  right: 0;
  width: auto;
}
.smartbox__container--calendar {
  left: auto;
  right: 0;
  width: auto;
  min-width: 730px;
}
@media (max-width: 768px) {
  .smartbox__container--calendar {
    min-width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
  }
}

.smartbox__panel {
  background: #ffffff;
  border: 1px solid var(--border-subtle, #e0e0e0);
  border-radius: var(--space-16, 16px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  overflow: hidden;
  box-sizing: border-box;
}

/* ========================================================
   AUTOCOMPLETE (PRODUCCIÓN EXACTA)
   ======================================================== */
.searcher {
  background-color: var(--bg-base, #ffffff);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 8px 0;
  width: 100%;
  min-width: 380px;
}
.searcher__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.searcher__item {
  width: 100%;
  border-bottom: 1px solid var(--border-subtle, #f0f0f0);
}
.searcher__item:last-child {
  border-bottom: none;
}
.searcher__action {
  align-items: center;
  background: none;
  border: none;
  border-radius: var(--space-8, 8px);
  cursor: pointer;
  display: flex;
  gap: var(--space-16, 16px);
  padding: 10px 16px;
  text-align: left;
  transition: background-color 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}
.searcher__action:hover, .searcher__action.is-active {
  background-color: var(--bg-level2, #f5f5f5);
}
.searcher__action:hover .searcher__name, .searcher__action:hover .searcher__iata,
.searcher__action.is-active .searcher__name, .searcher__action.is-active .searcher__iata {
  font-weight: 600;
}
.searcher__icon {
  align-items: center;
  border-radius: var(--space-8, 8px);
  display: flex;
  flex-shrink: 0;
  height: 40px;
  justify-content: center;
  width: 36px;
  color: var(--text-subtle, #757575);
  font-size: 20px;
}
.searcher__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}
.searcher__name-container {
  align-items: center;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.searcher__name {
  color: var(--text-strong, #1a1a1a);
  font-size: 0.9375rem;
  font-weight: 400;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.searcher__name strong, .searcher__name b {
  font-weight: 700;
  color: var(--text-strong, #111111);
}
.searcher__iata {
  color: var(--text-subtle, #666666);
  font-size: 0.9375rem;
  font-weight: 400;
  flex-shrink: 0;
  margin-left: var(--space-8, 8px);
  text-transform: uppercase;
}
.searcher__loc {
  color: var(--text-subtle, #757575);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.searcher__empty {
  color: var(--text-subtle, #666);
  font-size: 0.9rem;
  padding: var(--space-16, 16px);
  text-align: center;
}
.searcher__loading {
  color: var(--text-subtle, #666);
  font-size: 0.875rem;
  padding: var(--space-12, 12px);
  text-align: center;
}

/* ========================================================
   CALENDARIO EXACTO DE PRODUCCIÓN (DOBLE MES CON PRECIOS)
   ======================================================== */
.calendar {
  -ms-overflow-style: none;
  background: var(--bg-base, #ffffff);
  box-sizing: border-box;
  color: var(--text-strong, #111111);
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  width: 720px;
  padding: 16px 20px;
}
@media (min-width: 992px) {
  .calendar {
    width: 740px;
  }
}

.calendar::-webkit-scrollbar {
  display: none;
}

/* Navegación y encabezados */
.calendar__nav {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.calendar__nav-titles {
  display: flex;
  flex: 1;
  font-size: 0.9375rem;
  justify-content: space-around;
}
.calendar__nav-month {
  color: var(--text-strong, #111111);
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: capitalize;
}
.calendar__nav-month span {
  color: var(--text-subtle, #757575);
  font-weight: 400;
  margin-left: 6px;
}
.calendar__nav-btn {
  align-items: center;
  background: var(--bg-base, #ffffff);
  border: 1px solid var(--border-subtle, #d8d8d8);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  cursor: pointer;
  display: flex;
  height: 34px;
  justify-content: center;
  width: 34px;
  transition: all 0.2s;
  color: var(--text-strong, #333);
}
.calendar__nav-btn:hover:not(:disabled) {
  background: var(--bg-level3, #f0f0f0);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}
.calendar__nav-btn:disabled {
  cursor: default;
  opacity: 0.25;
}

/* Layout y meses */
.calendar__layout {
  background: var(--bg-base, #ffffff);
  flex: 1;
  overflow: visible;
}
.calendar__body {
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  justify-content: space-between;
  padding: 0;
}
.calendar__month {
  flex: 1 1 50%;
  margin: 0;
  padding-bottom: 8px;
}
.calendar__month-title {
  display: none; /* Se muestra en nav-titles */
}
.calendar__weekdays {
  color: var(--text-strong, #444);
  display: grid;
  font-size: 0.75rem;
  font-weight: 600;
  grid-template-columns: repeat(7, 1fr);
  padding-bottom: 8px;
  text-align: center;
}
.calendar__days {
  column-gap: 2px;
  row-gap: 2px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

/* Celdas de días */
.calendar__day {
  align-items: center;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-size: 0.875rem;
  font-weight: 600;
  height: 46px;
  justify-content: center;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s;
  color: var(--text-strong, #222);
}
.calendar__day-val {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: normal;
  margin-bottom: 0;
  pointer-events: none;
  z-index: 2;
}
.calendar__day-price {
  color: var(--text-subtle, #757575);
  font-size: 0.625rem;
  line-height: 1;
  margin-top: 1px;
  min-height: 12px;
  pointer-events: none;
  font-weight: 500;
}

/* Hover de días */
.calendar__day:hover:not(.calendar__day--disabled):not(.calendar__day--empty):not(.calendar__day--in-range) {
  border: 1px solid var(--border-primary, #0066cc);
  z-index: 10;
}

/* Estados de días */
.calendar__day--empty {
  cursor: default;
  pointer-events: none;
}
.calendar__day--disabled {
  color: var(--text-disabled, #ccc) !important;
  cursor: default;
  pointer-events: none;
}
.calendar__day--disabled .calendar__day-price {
  opacity: 0.4;
}

/* Precios bajos (verde claro) y muy bajos (verde medio) */
.calendar__day--bg-success-light {
  background-color: #e7ffdd;
}
.calendar__day--bg-success {
  background-color: #bce3b2;
}

/* Días seleccionados y en rango */
.calendar__day--in-range {
  background-color: var(--bg-primary-level1, #e6f0fa) !important;
  border-radius: 0 !important;
  position: relative;
  color: var(--text-strong, #111);
}
.calendar__day--start {
  background-color: var(--bg-primary, #0066cc) !important;
  border-radius: 4px 0 0 4px !important;
  color: #ffffff !important;
  font-weight: 700;
  z-index: 2;
}
.calendar__day--end {
  background-color: var(--bg-primary, #0066cc) !important;
  border-radius: 0 4px 4px 0 !important;
  color: #ffffff !important;
  font-weight: 700;
  z-index: 2;
}
.calendar__day--start.calendar__day--end {
  border-radius: 4px !important;
}
.calendar__day--start .calendar__day-price,
.calendar__day--end .calendar__day-price {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Flechas conectoras de rango de producción */
.calendar__day--start::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid var(--bg-primary, #0066cc);
  z-index: 3;
}
.calendar__day--end::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid var(--bg-primary, #0066cc);
  z-index: 3;
}
.calendar__day--end::after,
.calendar__day--start.calendar__day--end::before,
.calendar__day--start.calendar__day--end::after {
  display: none !important;
}

/* Footer del calendario */
.calendar__footer {
  background: var(--bg-base, #ffffff);
  border-top: 1px solid var(--border-subtle, #ebebeb);
  flex-shrink: 0;
  padding: 14px 0 4px 0;
  margin-top: 12px;
}
.calendar__legend {
  align-items: center;
  color: var(--text-subtle, #666666);
  column-gap: 24px;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.75rem;
  justify-content: center;
  padding-bottom: 8px;
}
.calendar__legend-item {
  align-items: center;
  display: flex;
  gap: 8px;
}
.calendar__legend-swatch {
  border: 1px solid var(--border-subtle, #d8d8d8);
  border-radius: 4px;
  height: 20px;
  width: 20px;
}
.calendar__legend-item--low .calendar__legend-swatch {
  background: #e7ffdd;
}
.calendar__legend-item--lower .calendar__legend-swatch {
  background: #bce3b2;
}
.calendar__footer-disclaimer {
  text-align: center;
  color: var(--text-subtle, #757575);
  font-size: 0.75rem;
  margin: 4px 0 0 0;
}
