/* Liveaboards | Destinations tabs. Destinations shows hub cards in the search
 * card only. Both breakpoints. Identity colours unchanged. */

#search .search-mode-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}
#search .search-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 11px;
  cursor: pointer;
  line-height: 1;
}
#search .search-mode-tab .smt-ico {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
}
#search .search-mode-tab.is-on {
  background: #fff;
  color: #0d3d6b;
  box-shadow: 0 4px 14px rgba(2, 11, 32, 0.18);
}

#search .search-card {
  position: relative;
}
#search .search-dest-panel {
  display: none;
  text-align: left;
}
#search .search-dest-lede {
  margin: 0 0 12px;
  font-size: 15px;
  color: #43566b;
  line-height: 1.45;
}
/* Mobile / tablet: one destination at a time, swipe sideways (old slider feel). */
#search .search-dest-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 2px 10px;
  margin: 0 -2px;
  scrollbar-width: thin;
  scrollbar-color: var(--teal, #0f9f9b) transparent;
}
#search .search-dest-grid::-webkit-scrollbar {
  height: 5px;
}
#search .search-dest-grid::-webkit-scrollbar-thumb {
  background: var(--teal, #0f9f9b);
  border-radius: 99px;
}
#search .search-dest-grid .dest-guide-card {
  flex: 0 0 calc(100% - 36px);
  width: calc(100% - 36px);
  max-width: none;
  scroll-snap-align: start;
}
#search .search-dest-more {
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 700;
}
#search .search-dest-more a {
  color: #0f9f9b;
  text-decoration: none;
}
#search .search-dest-more a:hover {
  text-decoration: underline;
}

/* Destinations mode: hide trip-compare chrome; show hub cards. */
#search .search-card[data-search-mode="dest"] .hb,
#search .search-card[data-search-mode="dest"] .hb-bar-note,
#search .search-card[data-search-mode="dest"] .search-intro,
#search .search-card[data-search-mode="dest"] .dest-section,
#search .search-card[data-search-mode="dest"] #hbWhenSec,
#search .search-card[data-search-mode="dest"] #when-field-note,
#search .search-card[data-search-mode="dest"] .see-box,
#search .search-card[data-search-mode="dest"] #hbExpSec,
#search .search-card[data-search-mode="dest"] #hbDivesSec,
#search .search-card[data-search-mode="dest"] #solo-box,
#search .search-card[data-search-mode="dest"] .hb-buddy,
#search .search-card[data-search-mode="dest"] .search-btn {
  display: none;
}
#search .search-card[data-search-mode="dest"] .search-dest-panel {
  display: block;
}

@media (min-width: 1025px) {
  #search .search-mode-tabs {
    margin: 0 0 12px;
    background: rgba(255, 255, 255, 0.12);
  }
  #search .search-card[data-search-mode="dest"] {
    background: #fff;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 16px;
    padding: 18px;
    max-width: 1100px;
    box-shadow: 0 18px 44px rgba(2, 11, 32, 0.28);
  }
  #search .search-card[data-search-mode="dest"] .search-mode-tabs {
    background: #eef6f8;
    border-color: #d7e6ec;
  }
  #search .search-card[data-search-mode="dest"] .search-mode-tab {
    color: #43566b;
  }
  #search .search-card[data-search-mode="dest"] .search-mode-tab.is-on {
    color: #0d3d6b;
  }
  /* Desktop: accepted multi-column grid. */
  #search .search-dest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
    margin: 0;
  }
  #search .search-dest-grid .dest-guide-card {
    flex: none;
    width: auto;
    max-width: none;
    scroll-snap-align: unset;
  }
}

@media (max-width: 1024px) {
  #search .search-mode-tabs {
    width: 100%;
    margin: 0 0 12px;
    background: #eef6f8;
    border-color: #d7e6ec;
  }
  #search .search-mode-tab {
    flex: 1 1 0;
    justify-content: center;
    color: #43566b;
    font-size: 13px;
    padding: 11px 10px;
  }
  #search .search-mode-tab.is-on {
    color: #0d3d6b;
  }
}
