/* ════════════════════════════════════════════════════════════
   search.css — Musio Smart Search Styles
   Material Design 3 · Native Android feel
════════════════════════════════════════════════════════════ */

/* ── Highlight mark ── */
.se-hl,
mark.se-hl {
  background: rgba(124,106,255,.28);
  color: var(--accent2);
  border-radius: 3px;
  font-weight: 700;
  padding: 0 1px;
}

/* ── Search hero ── */
.search-hero {
  padding: 14px 0 8px;
  margin-bottom: 4px;
}
.search-hero h2 {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 4px;
}
.search-hero p {
  font-size: 13px;
  color: var(--txt2);
}

/* ── Autocomplete suggestions box ── */
#se-suggestions {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: -4px 0 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  animation: se-fade-in .15s ease;
}
@keyframes se-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.se-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .15s;
  min-height: 48px;
}
.se-suggest-item:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.se-suggest-item:active {
  background: rgba(124,106,255,.12);
}
.se-suggest-item > i {
  color: var(--txt3);
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.se-suggest-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.se-suggest-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.se-suggest-sub {
  font-size: 12px;
  color: var(--txt3);
}

/* ── Search history ── */
.search-recent-wrap {
  margin-bottom: 20px;
}
.search-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.search-recent-head span {
  font-size: 14px;
  font-weight: 800;
}
.search-clear-hist {
  font-size: 12px;
  font-weight: 700;
  color: var(--txt3);
  cursor: pointer;
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .15s;
}
.search-clear-hist:active {
  background: rgba(255,255,255,.08);
}
.search-recent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .15s;
  min-height: 48px;
}
.search-recent-item:active {
  background: rgba(255,255,255,.07);
}
.search-recent-item > i {
  color: var(--txt3);
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.search-recent-item > span {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt2);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sri-del {
  background: none;
  border: none;
  color: var(--txt3);
  font-size: 12px;
  cursor: pointer;
  padding: 6px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}
.sri-del:active {
  background: rgba(255,80,80,.12);
  color: #ff7070;
}

/* ── Filter tabs ── */
.search-filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.search-filter-tabs::-webkit-scrollbar { display: none; }
.sf-tab {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--txt2);
  background: transparent;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.sf-tab:active {
  transform: scale(.96);
}
.sf-tab.active {
  background: rgba(124,106,255,.2);
  border-color: var(--accent);
  color: var(--accent2);
}

/* ── Results header ── */
.search-results-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--txt3);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
  margin-top: 4px;
}

/* ── No result state ── */
.search-no-result {
  text-align: center;
  padding: 48px 24px 24px;
  color: var(--txt3);
}
.search-no-result-icon {
  width: 64px;
  height: 64px;
  background: rgba(124,106,255,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.search-no-result-icon i {
  font-size: 26px;
  color: var(--accent2);
}
.search-no-result p {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 6px;
}
.search-no-result .search-no-result-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--txt3);
  opacity: .7;
}

/* ── Lyric snippet ── */
.search-lyric-snip-wrap {
  margin: -6px 10px 6px calc(24px + 46px + 10px);
}
.search-lyric-snippet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--txt3);
  line-height: 1.5;
  padding: 6px 10px;
  background: rgba(124,106,255,.07);
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
}
.search-lyric-snippet > i {
  font-size: 10px;
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent2);
  opacity: .8;
}
.search-lyric-snippet .se-hl,
.search-lyric-snippet mark.se-hl {
  color: var(--accent2);
  font-weight: 800;
  background: transparent;
}

/* ── tb-search-clear (top bar) ── */
.tb-search-clear {
  background: none;
  border: none;
  color: var(--txt3);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  display: none;
  flex-shrink: 0;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
}
.tb-search-clear.show { display: flex; }
