.section_layout146 {
  .layout146_pointer-wrapper:hover {
    .layout146_pointer-tooltip {
      opacity: 1;
      visibility: visible;
      pointer-events: visible;
      z-index: 999;
    }
  }

  .layout146_pointer-tooltip {
    transition: all 0.3s ease;
  }
}

/* Datepicker customizations */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: #1a1a1a;
  border-color: #1a1a1a;
}

.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: #333;
  border-color: #333;
}

/* Suggestions dropdown styling */
.suggestions {
  background-color: white;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  position: absolute;
  width: 100%;
}

.suggestions li {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.suggestions li:hover {
  background-color: #f5f5f5;
}

/* Make sure flatpickr calendar appears above other elements */
.flatpickr-calendar {
  z-index: 100 !important;
}

/* Mobile optimization */
@media (max-width: 767px) {
  .flatpickr-calendar {
    width: 100%;
    max-width: 307px;
  }
}

/* swap button */
/* Animation for input swap */
@keyframes swapOut {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.swapping {
  animation: swapOut 0.3s ease-in-out;
}

/* Make swap button more interactive */
.hero_form_btn-wrap {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hero_form_btn-wrap:hover {
  transform: scale(1.1);
}

.hero_form_btn-wrap:active {
  transform: scale(0.95);
}

/* Homepage */
/* ===== CUSTOM SELECT CONTAINER ===== */
.custom-select-container {
  position: relative;
  width: 100%;
  font-family: inherit;
}

/* ===== TRIGGER BUTTON ===== */
.custom-select-trigger {
  width: 100%;
  padding: 0 0.75rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  min-height: 48px;
  outline: none;
  user-select: none;
}

.custom-select-trigger:hover {
  border-color: #ccc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-select-trigger:focus {
  border-color: #ec4e38;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.custom-select-trigger.active {
  border-color: #ec4e38;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  border-radius: 8px 8px 0 0;
}

.selected-content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.selected-text {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.selected-text.placeholder {
  color: #999;
  font-weight: 400;
}

.selected-initial {
  background: linear-gradient(135deg, #ec4e38, #ff874a);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3);
}

.custom-select-arrow {
  width: 12px;
  height: 12px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: #666;
}

.custom-select-trigger.active .custom-select-arrow {
  transform: rotate(180deg);
  color: #ec4e38;
}

/* ===== DROPDOWN CONTAINER ===== */
.custom-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ec4e38;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.custom-select-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-select-dropdown.updating {
  animation: routeUpdate 0.3s ease-out;
}

/* ===== ROUTING INFO ===== */
.routing-info {
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 4px;
  font-size: 12px;
  color: #495057;
}

.routing-info.hub-routes {
  background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
  border-left: 4px solid #2196f3;
  color: #1565c0;
}

.info-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.icon-plane::before {
  content: "✈️";
  font-size: 14px;
}

/* ===== OPTIONS ===== */
.custom-select-option {
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f5f5f5;
  position: relative;
  background: white;
}

.custom-select-option:last-child {
  border-bottom: none;
}

.custom-select-option:hover:not(.disabled):not(.selected) {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  transform: translateX(2px);
  border-left: 3px solid #ec4e38;
  padding-left: 13px;
}

.custom-select-option.selected {
  background: linear-gradient(135deg, #ec4e38, #ff874a);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-left: 3px solid #ec4e38;
  padding-left: 13px;
}

.custom-select-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: #f8f9fa;
}

.location-content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.location-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.location-name {
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.location-initial {
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  color: #666;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 32px;
  text-align: center;
  margin-left: auto;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.custom-select-option.selected .location-initial {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ===== HUB INDICATOR ===== */
.hub-indicator {
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(255, 107, 107, 0.3);
}

.custom-select-option.selected .hub-indicator {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ===== ROUTE WARNING ===== */
.route-warning {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
}

.warning-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-icon {
  font-size: 16px;
}

.warning-text {
  font-size: 14px;
  font-weight: 500;
  color: #856404;
}

/* ===== SCROLLBAR STYLING ===== */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 0 8px 0;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #c1c1c1, #a8a8a8);
  border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #a8a8a8, #888);
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes routeUpdate {
  0% {
    opacity: 0.5;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.route-warning.fade-out {
  animation: fadeOut 0.3s ease-in forwards;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .custom-select-trigger {
    padding: 14px 14px 14px 16px;
    min-height: 52px;
    font-size: 16px;
  }

  .custom-select-option {
    padding: 16px;
  }

  .location-name {
    font-size: 16px;
  }

  .location-initial {
    font-size: 14px;
    padding: 6px 10px;
    min-width: 36px;
  }

  .selected-initial {
    font-size: 12px;
    padding: 5px 8px;
  }

  .custom-select-dropdown {
    max-height: 320px;
  }

  .route-warning {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .hub-indicator {
    font-size: 9px;
    padding: 2px 4px;
    margin-left: 4px;
  }

  .routing-info {
    padding: 10px 12px;
    font-size: 11px;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  .custom-select-trigger,
  .custom-select-dropdown,
  .custom-select-option,
  .custom-select-arrow {
    transition: none;
  }

  .custom-select-dropdown.updating {
    animation: none;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  .custom-select-trigger {
    border-width: 2px;
  }

  .custom-select-option.selected {
    background: #000;
    color: #fff;
    border-left: 4px solid #fff;
  }

  .location-initial {
    border: 1px solid #666;
  }
}

.multi-leg-fieldset {
  display: contents; /* Allows grid children to participate in parent grid */
}

/* Optional: Add visual separation */
.multi-leg-fieldset:not(:first-of-type) {
  border-top: 1px solid #e0e0e0;
  padding-top: 1rem;
  margin-top: 1rem;
}
