/* Lab guide header search bar.
 * Pill-shaped input on the right side of the header with the Cisco Live
 * dark-blue/cyan palette (see _ciscolive_v2_colors.scss).
 */

.lab-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
  max-width: 32vw;
}

.lab-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  opacity: 0.85;
  font-size: 0.85rem;
  pointer-events: none;
}

.lab-search-input {
  width: 100%;
  height: 34px;
  padding: 0 14px 0 36px;
  border-radius: 999px;       /* elongated circular pill */
  border: 1px solid rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.9rem;
  font-family: "Roboto", system-ui, -apple-system, sans-serif;
  outline: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lab-search-input::placeholder {
  color: #e6eef7;
  opacity: 0.85;
  font-style: normal;
}

.lab-search-input:hover {
  background-color: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.55);
}

.lab-search-input:focus {
  background-color: rgba(255, 255, 255, 0.95);
  color: #0d274d;             /* $cl-primary */
  border-color: #00bceb;      /* $cl-info */
  box-shadow: 0 0 0 3px rgba(0, 188, 235, 0.25);
}

.lab-search-input:focus::placeholder {
  color: #6d7a8c;
}

.lab-search:focus-within .lab-search-icon {
  color: #1e4471;             /* $cl-secondary */
  opacity: 1;
}

/* Hide the default search "x" reset button to keep the pill clean */
.lab-search-input::-webkit-search-decoration,
.lab-search-input::-webkit-search-cancel-button,
.lab-search-input::-webkit-search-results-button,
.lab-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

/* Results dropdown */
.lab-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: 420px;
  max-width: 90vw;
  max-height: 60vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d6dce5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(13, 39, 77, 0.18);
  z-index: 1080;
  padding: 4px 0;
}

.lab-search-results.show {
  display: block;
}

.lab-search-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #101820;             /* $cl-dark */
  border-left: 3px solid transparent;
  cursor: pointer;
}

.lab-search-item + .lab-search-item {
  border-top: 1px solid #f0f2f5;
}

.lab-search-item:hover,
.lab-search-item.active,
.lab-search-item:focus {
  background-color: #f4f8fc;
  border-left-color: #00bceb;  /* $cl-info */
  text-decoration: none;
  color: #0d274d;
}

.lab-search-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0d274d;             /* $cl-primary */
  margin-bottom: 2px;
}

.lab-search-item-crumb {
  font-size: 0.75rem;
  color: #5a6a7d;
  text-transform: lowercase;
  margin-bottom: 4px;
}

.lab-search-item-snippet {
  font-size: 0.82rem;
  color: #3a4a5d;
  line-height: 1.35;
}

.lab-search-item-snippet mark {
  background-color: #fff3cd;
  color: #0d274d;
  padding: 0 2px;
  border-radius: 2px;
}

.lab-search-empty {
  padding: 14px;
  font-size: 0.85rem;
  color: #5a6a7d;
  text-align: center;
}

/* Responsive: shrink on small screens but keep visible */
@media (max-width: 768px) {
  .lab-search { width: 180px; }
  .lab-search-results { width: 320px; }
}
@media (max-width: 480px) {
  .lab-search { width: 140px; }
  .lab-search-input { font-size: 0.8rem; padding-left: 30px; }
  .lab-search-icon { left: 10px; }
}
