/* ============================================================
   MEILS – Hero Freight Search Bar
   Positioned at the bottom of the 3D hero, non-rotating.
============================================================ */

/* ── Wrapper ── */
.hero-search-wrap {
  position: relative;   /* flows inside hero-content-3d */
  margin-top: 28px;
  width: 100%;
  max-width: 100%;
  z-index: 3;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
  overflow: hidden;
  pointer-events: all;
}

/* ── Tab row ── */
.hsb-tabs {
  display: flex;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.hsb-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: color .2s, background .2s;
  white-space: nowrap;
}

.hsb-tab i { font-size: .75rem; }

.hsb-tab:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.hsb-tab.active {
  color: #fff;
  background: var(--teal-mid);
  border-bottom: 2px solid var(--green-bright);
}

/* Request a Quote tab – glow white */
.hsb-tab-cta {
  color: #fff;
  text-shadow:
    0 0 8px rgba(255,255,255,.9),
    0 0 18px rgba(255,255,255,.6),
    0 0 32px rgba(255,255,255,.3);
}
.hsb-tab-cta:hover {
  color: #fff;
  background: rgba(255,255,255,.12);
  text-shadow:
    0 0 10px rgba(255,255,255,1),
    0 0 24px rgba(255,255,255,.8),
    0 0 40px rgba(255,255,255,.4);
}

.hsb-ext { font-size: .65rem !important; opacity: .8; }

/* ── Search body ── */
.hsb-body {
  display: flex;
  align-items: center;
  background: #fff;
  gap: 0;
  padding: 0 10px 0 0;
  min-height: 87px;
}

/* ── Individual input wraps ── */
.hsb-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 0 14px;
  border-right: 1px solid var(--gray-border);
  height: 87px;
  min-width: 0;
}

.hsb-date-wrap { flex: 0 0 180px; }

.hsb-icon {
  color: var(--teal-mid);
  font-size: .85rem;
  flex-shrink: 0;
}

.hsb-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: .85rem;
  font-family: inherit;
  color: var(--text-dark);
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hsb-input::placeholder { color: #999; font-size: .82rem; }

.hsb-date {
  color: var(--text-dark);
  font-size: .82rem;
  cursor: pointer;
}
.hsb-date::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  width: 100%;
  cursor: pointer;
}

/* ── Swap button ── */
.hsb-swap {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-border);
  background: #fff;
  color: var(--teal-mid);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .8rem;
  margin: 0 4px;
  transition: background .2s, color .2s, border-color .2s;
  flex: none;
}
.hsb-swap:hover {
  background: var(--teal-mid);
  color: #fff;
  border-color: var(--teal-mid);
}

/* ── Cargo select ── */
.hsb-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 140px;
  padding: 0 10px 0 14px;
  border-right: 1px solid var(--gray-border);
  height: 87px;
  position: relative;
}

.hsb-select {
  border: none;
  outline: none;
  font-size: .82rem;
  font-family: inherit;
  color: var(--text-dark);
  background: transparent;
  appearance: none;
  cursor: pointer;
  padding-right: 16px;
  width: 100%;
}

.hsb-select-arrow {
  position: absolute;
  right: 10px;
  font-size: .65rem;
  color: #999;
  pointer-events: none;
}

/* ── Search button ── */
.hsb-search-btn {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: 12px;
  border: none;
  background: var(--cta-orange);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  margin-left: 8px;
  transition: background .2s, transform .15s;
}
.hsb-search-btn:hover {
  background: #e07800;
  transform: scale(1.05);
}

/* ── Coming-soon toast ── */
.hsb-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--teal-dark);
  color: #fff;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: 0 6px 24px rgba(0,0,0,.3);
  opacity: 0;
  transition: opacity .3s, transform .3s;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
}
.hsb-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .hero-search-wrap { max-width: 100%; }
}

@media (max-width: 820px) {
  .hero-search-wrap { margin-top: 20px; }
  .hsb-body { flex-wrap: wrap; padding: 8px; gap: 6px; height: auto; }
  .hsb-input-wrap { border-right: none; border: 1px solid var(--gray-border); border-radius: 8px; height: 44px; flex: 1 1 calc(50% - 6px); }
  .hsb-date-wrap  { flex: 1 1 calc(50% - 6px); }
  .hsb-select-wrap { border-right: none; border: 1px solid var(--gray-border); border-radius: 8px; height: 44px; flex: 1 1 calc(50% - 6px); }
  .hsb-swap { display: none; }
  .hsb-search-btn { width: 100%; border-radius: 8px; height: 44px; margin: 2px 0 0; font-size: .9rem; }
  .hsb-search-btn::after { content: ' Search'; font-family: inherit; font-size: .9rem; font-weight: 600; margin-left: 8px; }
}

@media (max-width: 480px) {
  .hsb-tabs { overflow-x: auto; scrollbar-width: none; }
  .hsb-tabs::-webkit-scrollbar { display: none; }
  .hsb-tab { font-size: .72rem; padding: 10px 12px; }
  .hsb-input-wrap, .hsb-select-wrap, .hsb-date-wrap { flex: 1 1 100%; }
}

/* ── Autocomplete dropdown ── */
.hsb-ac-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: -14px;
  min-width: calc(100% + 28px);
  background: #fff;
  border: 1px solid #dde2e8;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  z-index: 9999;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.hsb-ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid #f2f4f7;
}
.hsb-ac-item:last-child { border-bottom: none; }
.hsb-ac-item:hover,
.hsb-ac-item.active { background: #f5f8ff; }

.hsb-ac-flag {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.hsb-ac-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hsb-ac-main {
  font-size: .88rem;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hsb-ac-main mark {
  background: none;
  color: #0a6abf;
  font-weight: 700;
}

.hsb-ac-sub {
  font-size: .74rem;
  color: #7a8499;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hsb-ac-badge {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: .2px;
}

.hsb-ac-empty {
  padding: 14px 16px;
  font-size: .84rem;
  color: #999;
  text-align: center;
}
