/* Universal search, in Pacy's night style (components/search.js).
   Loaded after sections.css; overrides only the search overlay. */

.search-panel {
  width: min(720px, 100%);
  color: #EFF5FF;
  background: linear-gradient(170deg, #0F2A4C 0%, #081D37 100%);
  border: 1px solid rgba(160, 210, 255, .16);
  box-shadow: 0 30px 80px rgba(3, 16, 32, .55);
  --ink: #EFF5FF; --ink-soft: #93A9C6; --ink-faint: #7291B7;
}
.search-field { border-bottom-color: rgba(160, 210, 255, .12); }
.search-field input { color: #F7FAFF; }
.search-field svg { color: #7FC4FF; }
.search-field .esc { border-color: rgba(160, 210, 255, .25); color: #93A9C6; }

.search-filters {
  display: flex;
  gap: 6px;
  padding: 10px var(--s-5, 20px);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(160, 210, 255, .12);
  flex: none;
}
.search-filters::-webkit-scrollbar { display: none; }
.sf-chip {
  flex: none;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid rgba(160, 210, 255, .2);
  background: rgba(247, 250, 255, .04);
  color: #B4C9E4;
  font: 600 .82rem var(--font-body, "Inter", system-ui, sans-serif);
  cursor: pointer;
}
.sf-chip:hover { background: rgba(247, 250, 255, .1); color: #F7FAFF; }
.sf-chip[aria-selected="true"] { background: var(--electric, #2563EB); border-color: var(--electric, #2563EB); color: #FFFFFF; }
.sf-chip:focus-visible { outline: 2px solid #7FC4FF; outline-offset: 2px; }

.search-results[aria-busy="true"] { opacity: .6; transition: opacity .15s ease; }
.res-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  letter-spacing: 0;
  text-transform: none;
  color: #93A9C6;
}
.res-clear { margin-inline-start: auto; font: 600 .78rem var(--font-body, "Inter", sans-serif); color: #7FC4FF; background: none; border: 0; cursor: pointer; }
.res-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #FF4D4D; animation: sr-pulse 1.6s ease-out infinite; }

.res-item { gap: 14px; color: #EFF5FF; }
.res-item .r-main { flex: 1 1 auto; min-width: 0; display: grid; }
.res-item .r-name { display: block; }
.res-item:hover, .res-item[aria-selected="true"] { background: rgba(72, 134, 255, .14); }
.res-item[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--electric, #2563EB); }
.res-item .r-name { color: #F7FAFF; }
.res-item .r-name mark { background: rgba(37, 99, 235, .45); color: #FFFFFF; }

.r-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: none;
  overflow: hidden;
}
.r-icon img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.r-icon--pair { background: none; display: flex; width: 44px; }
.r-icon--pair img { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.r-icon--pair img + img { margin-inline-start: -6px; margin-top: 14px; }
.r-icon--glyph { background: rgba(37, 99, 235, .22); color: #7FC4FF; }
.r-icon--glyph svg { width: 20px; height: 20px; }

.res-item .r-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 2px;
  color: #93A9C6;
  font-size: .8rem;
}
.r-meta { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.r-chip {
  flex: none;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(247, 250, 255, .08);
  color: #B4C9E4;
}
.r-chip--team { background: rgba(37, 99, 235, .25); color: #9FC0FF; }
.r-chip--competition { background: rgba(255, 176, 32, .16); color: #FFD27A; }
.r-chip--match { background: rgba(120, 230, 170, .14); color: #8EEAB9; }
.r-chip--sport { background: rgba(127, 196, 255, .16); color: #7FC4FF; }
.r-chip--article { background: rgba(247, 250, 255, .1); color: #D8E4F2; }

.r-live, .r-score, .r-when { margin-inline-start: auto; flex: none; font-variant-numeric: tabular-nums; }
.r-live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
          background: rgba(255, 77, 77, .14); color: #FF7A7A; font-weight: 700; font-size: .85rem; }
.r-live i { width: 7px; height: 7px; border-radius: 50%; background: #FF4D4D; animation: sr-pulse 1.6s ease-out infinite; }
.r-score { font-family: var(--font-display, "Sora", sans-serif); font-weight: 700; color: #F7FAFF; }
.r-when { font-size: .8rem; color: #93A9C6; }
@keyframes sr-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, .6); } 70% { box-shadow: 0 0 0 7px rgba(255, 77, 77, 0); } 100% { box-shadow: none; } }

.search-empty h3 { color: #F7FAFF; }
.search-empty p { color: #93A9C6; }
.search-foot { border-top-color: rgba(160, 210, 255, .12); color: #7291B7; }
.search-foot kbd { background: rgba(247, 250, 255, .06); border-color: rgba(160, 210, 255, .2); color: #B4C9E4; }

@media (prefers-reduced-motion: reduce) { .res-live-dot, .r-live i { animation: none; } }
[data-motion="off"] :is(.res-live-dot, .r-live i) { animation: none; }
