/* Search palette: results left, Watchlist right.
   Loaded after flow.css / site-search.css by mu-plugins/mf-search-plus.php on
   every page that carries flow.js. Markup is built by flow.js (buildLayout). */

:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal.mfsp-two[open] { width: min(1020px, 94vw); }

.mfsp-cols { display: flex; align-items: flex-start; margin-top: 4px; }
.mfsp-main { flex: 1 1 68%; min-width: 0; }
.mfsp-two .mfsp-main { flex: 0 0 68%; padding-right: 20px; }
.mfsp-side { flex: 1 1 32%; min-width: 0; position: sticky; top: 0; align-self: flex-start;
  border-left: 1px solid var(--line, #2a313c); padding: 4px 0 4px 18px; }
.mfsp-side[hidden] { display: none; }

.mfsp-side-h { display: flex; justify-content: space-between; align-items: baseline;
  font: 700 11px/1 inherit; letter-spacing: .07em; text-transform: uppercase;
  color: var(--dim, #6b7684); margin: 14px 0 8px; }
.mfsp-side-h span { font-weight: 500; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.mfsp-side-p { margin: 0 0 12px; color: var(--mut, #9aa7b4); font-size: 12.5px; line-height: 1.5; }
.mfsp-cta { display: inline-block; padding: 8px 14px; background: var(--accent, #16b3a0); color: #06201c;
  font-weight: 600; font-size: 13px; text-decoration: none; border-radius: 4px; }
.mfsp-cta:hover { filter: brightness(1.08); }
.mfsp-w { display: block; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); text-decoration: none; }
.mfsp-w:last-of-type { border-bottom: 0; }
.mfsp-w-t { display: block; color: var(--text, #e6edf3); font-weight: 600; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfsp-w-m { display: block; color: var(--mut, #9aa7b4); font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfsp-w:hover .mfsp-w-t { color: var(--accent, #16b3a0); }
.mfsp-side-more { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--accent, #16b3a0); text-decoration: none; }
.mfsp-side-more:hover { text-decoration: underline; }

/* rows: link area + star. The row itself carries no vertical padding: the
   link does, so the whole line is one click target (beats the (0,2,0)
   `.mfs-scope .mfd-rr` padding from site-search.css). */
:is(.mfd, .mfd-scope, .mfs-scope) .mfsp-row.mfd-rr { padding: 0 0 0 8px; }
.mfsp-row { display: flex; align-items: center; gap: 8px; padding: 0 0 0 8px;
  border-left: 2px solid transparent; border-bottom: 1px solid rgba(255,255,255,.06); }
.mfsp-row.is-sel { background: rgba(255,255,255,.045); border-left-color: var(--accent, #16b3a0); }
.mfsp-row.is-sel .mfd-sym { color: var(--accent, #16b3a0); }
.mfsp-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 0;
  text-decoration: none; color: inherit; }
.mfsp-link:hover .mfd-sym { color: var(--accent, #16b3a0); }
.mfsp-row .mfd-sym, .mfsp-row .mfd-mut { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.mfsp-star { flex: none; appearance: none; background: none; border: 0; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 6px 8px; color: var(--dim, #6b7684); }
.mfsp-star:hover { color: #e5b04a; }
.mfsp-star.on { color: #e5b04a; }
.mfsp-star[disabled] { opacity: .5; cursor: default; }
.mfsp-star:focus-visible, .mfsp-recent button:focus-visible { outline: 2px solid var(--accent, #16b3a0); outline-offset: 1px; }

/* Ask AI row */
.mfsp-ai { cursor: pointer; padding: 9px 10px 9px 10px; margin: 8px 0 4px; gap: 12px;
  border: 1px solid var(--accent, #16b3a0); border-left-width: 2px; background: rgba(22,179,160,.07); }
.mfsp-ai.is-sel { background: rgba(22,179,160,.16); }
.mfsp-ai.lead { margin-top: 12px; }
.mfsp-ai-i { color: var(--accent, #16b3a0); flex: none; }
.mfsp-kbd { flex: none; font: 11px ui-monospace, Consolas, monospace; color: var(--mut, #9aa7b4);
  border: 1px solid var(--line, #2a313c); padding: 1px 6px; border-radius: 3px; }

/* hovered / keyboard-selected row: bright green title */
:is(.mfd, .mfd-scope, .mfs-scope) .mfsp-row.mfd-rr.is-sel .mfd-sym,
:is(.mfd, .mfd-scope, .mfs-scope) .mfsp-row.mfd-rr:hover .mfd-sym,
:is(.mfd, .mfd-scope, .mfs-scope) .mfsp-row.mfd-rr .mfsp-link:hover .mfd-sym { color: #3cf0c4 !important; }
.mfsp-w:hover .mfsp-w-t { color: #3cf0c4; }

/* the other green accents in the palette: Ask AI row, Browse links, View more, watchlist link */
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-ai .mfd-sym,
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-ai-i,
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfd-browse a,
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfd-sr-more button,
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-side-more,
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-msg a { color: #3cf0c4 !important; }

/* search box: smaller type than the base dialog's inline 15px */
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal [data-mfd="search-input"] { font-size: 13px !important; padding: 9px 12px !important; }

/* always-visible Ask AI strip, under the tabs */
.mfsp-askbar { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 5px 8px;
  border: 1px solid var(--accent, #16b3a0); background: rgba(22,179,160,.07); }
.mfsp-askbtn { flex: none; appearance: none; border: 0; cursor: pointer; padding: 4px 10px;
  background: var(--accent, #16b3a0); color: #06201c; font: 600 11.5px/1.2 inherit; border-radius: 4px; }
.mfsp-askbtn:hover { filter: brightness(1.08); }
.mfsp-askbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mfsp-askhint { flex: 1; min-width: 0; color: var(--mut, #9aa7b4); font-size: 11.5px; }
.mfsp-ai .mfd-sym { font-size: 12px; font-weight: 500; }
.mfsp-ai .mfd-mut { font-size: 11px; }
.mfsp-ai { padding-top: 6px; padding-bottom: 6px; }

.mfsp-recent { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.mfsp-recent button { appearance: none; background: var(--panel, #131922); border: 1px solid var(--line, #2a313c);
  color: var(--text, #e6edf3); font: inherit; font-size: 12.5px; padding: 4px 11px; cursor: pointer; border-radius: 4px; }
.mfsp-recent button:hover { border-color: var(--accent, #16b3a0); }

.mfsp-msg { margin: 10px 0 0; padding: 8px 10px; font-size: 12.5px; color: var(--text, #e6edf3);
  border: 1px solid #5a4a22; background: rgba(229,176,74,.08); }
.mfsp-msg a { color: var(--accent, #16b3a0); }
.mfsp-msg[hidden] { display: none; }

@media (max-width: 780px) {
  .mfsp-cols { display: block; }
  .mfsp-two .mfsp-main { padding-right: 0; flex: 1 1 auto; }
  .mfsp-side { display: none; }
  .mfsp-kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { .mfsp-cta { transition: none; } }

/* refinement pass: flat square controls, quieter suggestions, tidier watchlist */
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfd-chip { border-radius: 2px; padding: 4px 11px; font-size: 12px; }
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfd-chip.on,
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfd-chip[aria-pressed="true"] { border-color: #3cf0c4; color: #3cf0c4; }
.mfsp-recent button { border-radius: 2px; }
.mfsp-askbar, .mfsp-askbtn { border-radius: 0; }
.mfsp-askbar { padding: 6px 8px; }
.mfsp-askbtn { padding: 5px 12px; font-size: 12px; }

/* suggested questions: plain rows, not three loud boxes */
.mfsp-ai { border: 0; border-left: 2px solid transparent; border-bottom: 1px solid rgba(255,255,255,.06);
  background: none; margin: 0; padding: 8px 8px; }
.mfsp-ai:hover, .mfsp-ai.is-sel { background: rgba(255,255,255,.045); border-left-color: #3cf0c4; }
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-ai .mfd-sym { color: var(--text, #e6edf3) !important; font-size: 12.5px; }
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-ai:hover .mfd-sym,
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-ai.is-sel .mfd-sym { color: #3cf0c4 !important; }
.mfsp-ai.lead { margin-top: 8px; }

/* watchlist column */
.mfsp-side { padding-left: 20px; }
.mfsp-w { padding: 9px 0; }
.mfsp-w-t { font-size: 13px; }
.mfsp-w-m { margin-top: 2px; font-size: 11px; letter-spacing: .02em; }
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfsp-side .mfd-sheet-h,
.mfsp-side-h { margin-top: 6px; }

/* footer: small Close, right aligned */
:is(.mfd, .mfd-scope, .mfs-scope) .mfd-search-modal .mfd-sheet-done { padding: 6px 16px; font-size: 12.5px; border-radius: 2px; margin-top: 12px; }
