/* FREPALI_SMART_SEARCH_V1: the top search bar's results panel (frepali-smart-search.js). */
.search-container.fps-on .search-dropdown-container.fps {
  --fps-accent: #1e88e5;
  --fps-bg: #fff;
  --fps-line: rgba(127, 127, 127, .18);
  --fps-hover: rgba(127, 127, 127, .11);
  --fps-soft: rgba(127, 127, 127, .13);
  width: 520px;
  max-width: calc(100vw - 24px);
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .08);
  border: 1px solid var(--fps-line);
}
.search-container.fps-on .search-advanced-container { display: none !important; }
.search-container.fps-on .search-dropdown-result {
  margin: 0;
  max-height: min(74vh, 660px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
@media (max-width: 800px) {
  .search-container.fps-on .search-dropdown-container.fps { width: auto; left: 0; right: 0; margin: 0 !important; max-width: none; }
  .search-container.fps-on .search-dropdown-result { max-height: calc(100vh - 120px); }
}

.fps .fps-progress { position: absolute; inset: 0 0 auto; height: 2px; overflow: hidden; z-index: 3; opacity: 0; transition: opacity .15s; pointer-events: none; }
.fps.fps-busy .fps-progress { opacity: 1; }
.fps .fps-progress::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: var(--fps-accent); border-radius: 2px; animation: fps-slide 1s ease-in-out infinite; }
@keyframes fps-slide { from { left: -40%; } to { left: 100%; } }

.fps svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Filter chips */
.fps .fps-chips { position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; padding: 12px 14px 10px; overflow-x: auto; scrollbar-width: none; background: var(--fps-bg); border-bottom: 1px solid var(--fps-line); }
.fps .fps-chips::-webkit-scrollbar { display: none; }
.fps .fps-chip { flex: none; padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.4; color: inherit; background: var(--fps-soft); border: 0; cursor: pointer; transition: background .12s, color .12s; }
.fps .fps-chip:hover { background: var(--fps-hover); }
.fps .fps-chip.is-on { background: var(--fps-accent); color: #fff; }

/* Sections */
.fps .fps-sec { padding: 4px 0 6px; }
.fps .fps-sec + .fps-sec { border-top: 1px solid var(--fps-line); }
.fps .fps-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.fps .fps-sec-h > span { opacity: .7; }
.fps .fps-link { border: 0; background: none; padding: 2px 4px; font-size: 12.5px; font-weight: 600; color: var(--fps-accent); cursor: pointer; }
.fps .fps-note { padding: 10px 16px 0; font-size: 12.5px; opacity: .7; }

/* Rows */
.fps a.fps-row { display: flex; align-items: center; gap: 12px; margin: 0 6px; padding: 8px 10px; border-radius: 10px; color: inherit !important; text-decoration: none !important; cursor: pointer; }
.fps .fps-row.is-active { background: var(--fps-hover); }
.fps .fps-av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; background: var(--fps-soft); }
.fps .fps-av.fps-sq { border-radius: 11px; }
.fps .fps-hash { display: grid; place-items: center; font-size: 19px; font-weight: 700; color: var(--fps-accent); }
.fps .fps-main { min-width: 0; flex: 1; }
.fps .fps-name { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.fps .fps-ell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fps .fps-seal { width: 16px; height: 16px; flex: none; }
.fps .fps-badge { flex: none; font-size: 11px; font-weight: 600; line-height: 1.5; padding: 0 7px; border-radius: 999px; background: var(--fps-soft); opacity: .85; }
.fps .fps-sub { margin-top: 1px; font-size: 12.5px; line-height: 1.35; opacity: .66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fps .fps-dot { margin: 0 5px; }
.fps mark { background: rgba(250, 204, 21, .42); color: inherit; padding: 0 1px; border-radius: 3px; }

/* Posts */
.fps a.fps-post { align-items: flex-start; padding-top: 10px; padding-bottom: 10px; }
.fps .fps-post-head { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; }
.fps .fps-av.fps-mini { width: 22px; height: 22px; }
.fps .fps-author { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fps .fps-post-head .fps-seal { width: 14px; height: 14px; }
.fps .fps-time, .fps .fps-post-head .fps-dot { opacity: .6; white-space: nowrap; }
.fps .fps-text { margin-top: 4px; font-size: 13.5px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.fps .fps-counts { display: flex; gap: 12px; margin-top: 5px; font-size: 12px; opacity: .6; }
.fps .fps-counts span { display: inline-flex; align-items: center; gap: 4px; }
.fps .fps-counts svg { width: 13px; height: 13px; }
.fps .fps-thumb { position: relative; flex: none; width: 68px; height: 68px; border-radius: 10px; overflow: hidden; background: var(--fps-soft); }
.fps .fps-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fps .fps-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .22); color: #fff; }
.fps .fps-play svg { width: 22px; height: 22px; fill: #fff; stroke: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }

/* Recent / trending pills */
.fps .fps-pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 8px; }
.fps .fps-pill { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--fps-line); background: transparent; font-size: 13px; font-weight: 500; color: inherit !important; text-decoration: none !important; cursor: pointer; }
.fps .fps-pill bdi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fps .fps-pill svg { width: 14px; height: 14px; opacity: .6; }
.fps .fps-pill:hover, .fps .fps-pill.is-active { background: var(--fps-hover); }

/* Show more, empty state, tips, footer */
.fps .fps-more { display: block; width: calc(100% - 32px); margin: 6px 16px 8px; padding: 8px; border: 0; border-radius: 10px; background: var(--fps-soft); color: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fps .fps-more:hover { background: var(--fps-hover); }
.fps .fps-more:disabled { opacity: .5; cursor: default; }
.fps .fps-empty { padding: 30px 20px 26px; text-align: center; font-size: 14px; }
.fps .fps-empty-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: 50%; background: var(--fps-soft); }
.fps .fps-empty-ic svg { width: 20px; height: 20px; opacity: .7; }
.fps .fps-tip { margin-top: 8px; font-size: 12.5px; opacity: .6; }
.fps .fps-tip-home { margin: 0; padding: 10px 16px 14px; }
.fps a.fps-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--fps-line); background: var(--fps-bg); font-size: 13px; font-weight: 600; color: inherit !important; text-decoration: none !important; }
.fps a.fps-foot:hover, .fps a.fps-foot.is-active { background: var(--fps-hover); }
.fps a.fps-foot svg { opacity: .65; }

@media (prefers-reduced-motion: reduce) {
  .fps .fps-progress::before { animation-duration: 2.5s; }
}
