body.live-search-open { overflow: hidden; }

.live-search-modal[hidden] { display: none; }

.live-search-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 24px;
  position: fixed;
  transition: opacity .18s ease;
  z-index: 2000;
}

.live-search-modal.is-open { opacity: 1; }

.live-search-modal__backdrop {
  backdrop-filter: blur(15px) brightness(45%);
  background: rgba(4, 8, 22, .45);
  inset: 0;
  position: absolute;
}

.live-search-modal__panel {
  background: rgba(18, 18, 21, .94);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  height: min(496px, calc(100vh - 48px));
  max-width: 620px;
  overflow: hidden;
  padding: 24px 0 32px;
  position: relative;
  transform: translateY(10px) scale(.985);
  transition: transform .18s ease;
  width: 100%;
  z-index: 1;
}

.live-search-modal.is-open .live-search-modal__panel { transform: translateY(0) scale(1); }

.live-search-modal__close {
  align-items: center;
  background: #353535;
  border: 0;
  border-radius: 9px;
  color: #fff;
  display: none;
  font-size: 24px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 32px;
  z-index: 2;
}

.live-search-modal__field {
  align-items: center;
  border-bottom: 1px solid #656565;
  display: flex;
  flex: 0 0 52px;
  margin: 0 32px;
}

.live-search-modal__search-icon {
  background: url(../images/search.svg) center / 24px no-repeat;
  flex: 0 0 32px;
  height: 32px;
  opacity: .7;
}

.live-search-modal__input {
  background: transparent;
  border: 0;
  color: #fff;
  flex: 1;
  font-size: 20px;
  letter-spacing: -.02em;
  min-width: 0;
  outline: none;
  padding: 12px 16px;
}

.live-search-modal__input::placeholder { color: #a6a5ac; opacity: .7; }

.live-search-modal__clear {
  background: transparent;
  border: 0;
  color: #6c6c70;
  cursor: pointer;
  font-size: 20px;
  opacity: 0;
  padding: 10px 0 10px 16px;
  pointer-events: none;
}

.live-search-modal__clear.is-visible { opacity: 1; pointer-events: auto; }

.live-search-modal__content {
  overflow-y: auto;
  padding-top: 24px;
  scrollbar-color: #8a8a8a transparent;
  scrollbar-width: thin;
}

.live-search-modal__heading {
  color: #f5f5f5b3;
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 12px;
  padding: 0 32px;
}

.live-search-modal__results { display: flex; flex-direction: column; gap: 6px; padding: 0 32px; }

.live-search-modal__result {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  display: flex;
  gap: 20px;
  padding: 6px 0;
  text-align: left;
  width: 100%;
}

.live-search-modal__result:focus-visible { outline: 2px solid #09f; outline-offset: 3px; }

.live-search-modal__result-icon {
  background: #1f1f1f url(../images/bubble-chat-question.svg) center / 28px no-repeat;
  border-radius: 14px;
  flex: 0 0 56px;
  height: 56px;
}

.live-search-modal__result-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.live-search-modal__result-category { color: #f5f5f5b3; font-size: 15px; line-height: 20px; }
.live-search-modal__result-title { color: #fff; font-size: 17px; font-weight: 500; line-height: 22px; }
.live-search-modal__result-snippet { color: #a6a5ac; font-size: 15px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-search-modal mark { background: transparent; color: #f4ff00; }

.live-search-modal__empty {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 300px;
  text-align: center;
}

.live-search-modal__empty strong { color: #fff; font-size: 20px; font-weight: 500; line-height: 28px; margin-bottom: 8px; }
.live-search-modal__empty span { color: #f5f5f5b3; font-size: 15px; line-height: 20px; }

.help-search-highlight { animation: help-search-pulse 2.2s ease-out; outline: 3px solid #09f; outline-offset: 5px; }
@keyframes help-search-pulse { 0%, 35% { outline-color: #09f; } 100% { outline-color: transparent; } }

@media (max-width: 899px) {
  .live-search-modal { align-items: stretch; padding: 0; }
  .live-search-modal__panel { border-radius: 0; height: 100dvh; max-width: none; padding: 56px 0 32px; }
  .live-search-modal__close { display: flex; }
  .live-search-modal__field { margin: 0 20px; }
  .live-search-modal__heading, .live-search-modal__results { padding-left: 20px; padding-right: 20px; }
}
