/* Swift Trucks — search bar, results panel, vehicle-highlight */
.search-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  color: #334155;
  background: transparent;
  transition: background-color .15s ease, color .15s ease;
}
.search-toggle-btn:hover { background: #f1f5f9; color: #14213d; }

#global-search-panel {
  position: fixed;
  top: calc(5rem + 2.25rem);
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .18);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
#global-search-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.search-panel-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 1.5rem;
}
.search-panel-form {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 2px solid #e2e8f0;
  border-radius: .85rem;
  padding: .35rem .5rem .35rem 1rem;
}
.search-panel-form:focus-within { border-color: #14213d; }
.search-panel-form input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  padding: .55rem 0;
  background: transparent;
}
.search-panel-submit {
  background: #14213d;
  color: #fff;
  border-radius: .6rem;
  padding: .55rem .9rem;
  font-weight: 700;
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  white-space: nowrap;
}
.search-panel-close {
  color: #64748b;
  padding: .4rem;
  border-radius: .5rem;
}
.search-panel-close:hover { background: #f1f5f9; }
.search-panel-hint {
  font-size: .72rem;
  color: #94a3b8;
  margin-top: .5rem;
  padding-left: .25rem;
}
#global-search-panel [data-search-results] {
  margin-top: .75rem;
  max-height: 60vh;
  overflow-y: auto;
}
#global-search-panel [data-search-results].has-results {
  border-top: 1px solid #eef1f5;
  padding-top: .5rem;
}
.search-result-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .5rem;
  border-radius: .6rem;
  color: #14213d;
  font-size: .9rem;
  line-height: 1.35;
}
.search-result-row:hover { background: #f8fafc; }
.search-result-row .material-symbols-outlined {
  font-size: 1.15rem;
  color: #64748b;
  flex-shrink: 0;
}
.search-result-meta { font-size: .74rem; color: #94a3b8; }
.search-result-enquire .material-symbols-outlined,
.search-result-category .material-symbols-outlined { color: #b3202e; }

body.search-open { overflow: hidden; }

@keyframes searchHighlightPulse {
  0%   { box-shadow: 0 0 0 0 rgba(179, 32, 46, .55); }
  70%  { box-shadow: 0 0 0 14px rgba(179, 32, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(179, 32, 46, 0); }
}
.search-highlight {
  outline: 3px solid #b3202e;
  outline-offset: 2px;
  animation: searchHighlightPulse 1.3s ease-out 2;
}

@media (max-width: 640px) {
  #global-search-panel { top: calc(5rem + 2.25rem); }
  .search-panel-inner { padding: 1rem; }
}
