/* Ask-the-directory search (Brad's idea). Scoped to the events page (body.dcd-events) and styled
   entirely through the theme's own tokens (--ink/--line/--surface/--blue/--blue-deep/--bg), so it
   follows the system light/dark preference with zero extra rules, same as app.css. */

body.dcd-events .aidc-search{
  margin:0 0 1.5rem; padding:1rem 1.1rem;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius,12px);
}
body.dcd-events .aidc-search label{
  display:block; font-weight:600; font-size:.95rem; margin-bottom:.5rem; color:var(--ink);
}
body.dcd-events .aidc-row{ display:flex; gap:.5rem; }
body.dcd-events .aidc-search input[type=search]{
  flex:1; min-width:0; font:inherit; color:var(--ink); background:var(--bg);
  border:1px solid var(--line); border-radius:8px; padding:.55rem .75rem;
}
body.dcd-events .aidc-search input[type=search]:focus{ outline:2px solid var(--blue); outline-offset:-1px; }
body.dcd-events .aidc-search button{
  font:inherit; font-weight:600; cursor:pointer; color:#fff; background:var(--blue-deep);
  border:0; border-radius:8px; padding:.55rem 1rem;
}
body.dcd-events .aidc-search button:hover{ background:var(--blue); }

body.dcd-events .aidc-read{ margin:.9rem 0 .3rem; font-size:.92rem; color:var(--ink); }
body.dcd-events .aidc-chip{
  display:inline-block; font-size:.8rem; padding:.1rem .55rem; margin:.1rem 0;
  background:var(--blue-soft, rgba(91,141,239,.12)); color:var(--blue-deep);
  border:1px solid var(--line); border-radius:999px; white-space:nowrap;
}
body.dcd-events .aidc-note{ font-size:.85rem; color:var(--muted, var(--ink)); opacity:.85; margin:.2rem 0; }

/* Results are a small honest table, horizontally scrollable inside their own box on phones,
   the page body never scrolls sideways (the sticky-header lesson from the main table). */
body.dcd-events .aidc-result-wrap{ overflow-x:auto; margin:.4rem 0 .2rem; }
body.dcd-events .aidc-results{ width:100%; border-collapse:collapse; font-size:.9rem; min-width:640px; }
body.dcd-events .aidc-results th{
  text-align:left; padding:.45rem .6rem; border-bottom:2px solid var(--line);
  font-size:.78rem; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap;
}
body.dcd-events .aidc-results td{ padding:.5rem .6rem; border-bottom:1px solid var(--line); vertical-align:top; }
body.dcd-events .aidc-results a{ color:var(--blue-deep); }

body.dcd-events .aidc-alt{ margin:.4rem 0 0; }
body.dcd-events .aidc-pplx{ font-size:.88rem; color:var(--blue-deep); text-decoration:underline; }
body.dcd-events .aidc-noparse p{ font-size:.92rem; margin:.5rem 0; }

@media (max-width:600px){
  body.dcd-events .aidc-row{ flex-direction:column; }
  body.dcd-events .aidc-search button{ width:100%; }
}

/* The main directory table's enhancements (events.css) target every .article-body table: fixed
   6-column widths and a sticky repositioned thead. Both are wrong for the 5-column results table,
   the sticky offset visually drops its header below the first data row. Reset them here; this
   file loads after events.css (declared dependency), so these win. */
body.dcd-events .article-body table.aidc-results{ table-layout:auto; }
body.dcd-events .article-body table.aidc-results thead th{
  position:static !important; top:auto !important; width:auto !important;
}

/* The AI-engine handoff row: compact pills, one per engine. */
body.dcd-events .aidc-engines{ display:inline-flex; flex-wrap:wrap; gap:.35rem; vertical-align:middle; }
body.dcd-events .aidc-engine{
  font-size:.8rem; padding:.15rem .6rem; border:1px solid var(--line); border-radius:999px;
  color:var(--blue-deep); text-decoration:none; background:var(--bg); white-space:nowrap;
}
body.dcd-events .aidc-engine:hover{ border-color:var(--blue); background:var(--blue-soft, rgba(91,141,239,.12)); }
