/* AG-COM Search — box, dropdown, phone overlay, results page.
   Everything is scoped under .agcs / .agcs-results so theme styles don't leak in
   (Flatsome styles bare inputs and buttons; the resets below undo that). */

.agcs, .agcs-results {
  --agcs-maroon: #5c0000;
  --agcs-maroon-dk: #3d0000;
  --agcs-ink: #1d1d1f;
  --agcs-muted: #5f5f5f;
  --agcs-faint: #6b6b6b;
  --agcs-line: #ece6de;
  --agcs-cream: #fcfaf7;
  --agcs-hover: #fbf1ef;
  --agcs-hl: #fde4b2;
  --agcs-head: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --agcs-body: 'Nokora', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.agcs { position: relative; width: 100%; font-family: var(--agcs-body); color: var(--agcs-ink); text-align: left; }
.agcs *, .agcs *::before, .agcs *::after { box-sizing: border-box; }
.agcs-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Theme resets ---- */
.agcs button { margin: 0; padding: 0; min-height: 0; text-transform: none; letter-spacing: normal; line-height: 1; box-shadow: none; font: inherit; cursor: pointer; }
.agcs a { text-decoration: none; }
.agcs form { margin: 0; }
.agcs mark.agcs-hl, .agcs-results mark.agcs-hl { background: var(--agcs-hl); color: inherit; border-radius: 3px; padding: 0; }

/* ---- The field ---- */
.agcs-form { display: flex; align-items: center; gap: 6px; }
.agcs-field { position: relative; flex: 1; min-width: 0; }
.agcs .agcs-ico { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--agcs-maroon); pointer-events: none; }
.agcs .agcs-input {
  display: block; width: 100%; height: 48px; margin: 0; padding: 0 48px 0 47px;
  border: 1.5px solid var(--agcs-maroon); border-radius: 24px; background: #fff; color: var(--agcs-ink);
  font-family: var(--agcs-body); font-size: 16px; line-height: normal; box-shadow: none; -webkit-appearance: none; appearance: none;
}
.agcs .agcs-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.agcs .agcs-input:focus { outline: none; border-color: var(--agcs-maroon); box-shadow: 0 0 0 4px rgba(92, 0, 0, .12); }
.agcs .agcs-input::placeholder { color: #8a8079; opacity: 1; }
.agcs .agcs-clear { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 18px; background: #f3eeee; color: var(--agcs-maroon); display: flex; align-items: center; justify-content: center; }
.agcs .agcs-clear[hidden] { display: none; }
.agcs .agcs-back { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--agcs-maroon); align-items: center; justify-content: center; flex-shrink: 0; }

/* On the maroon catalog banner */
.agcs--catalog .agcs-input { height: 56px; border: 3px solid #fff; border-radius: 10px; font-size: 17px; padding-left: 50px; box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }
.agcs--catalog .agcs-input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 4px 12px rgba(0, 0, 0, .2); }

/* ---- Dropdown ---- */
.agcs-panel {
  position: absolute; z-index: 9990; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(920px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 140px)); overflow-y: auto;
  background: #fff; border: 1px solid #e4ddd5; border-radius: 14px; box-shadow: 0 18px 50px rgba(40, 10, 10, .22);
}
.agcs-panel[hidden] { display: none; }
.agcs-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.agcs-cols--one { grid-template-columns: minmax(0, 1fr); }
.agcs-cols--one .agcs-col--parts { border-left: 0; }
.agcs-col { padding: 12px 14px 14px; min-width: 0; }
.agcs-col--parts { background: var(--agcs-cream); border-left: 1px solid var(--agcs-line); }
.agcs-label { font-family: var(--agcs-head); font-weight: 700; font-size: 12px; letter-spacing: .9px; text-transform: uppercase; color: var(--agcs-faint); padding: 8px 10px 6px; }

.agcs .agcs-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--agcs-ink); }
.agcs .agcs-row:hover, .agcs .agcs-row:focus { background: var(--agcs-hover); outline: none; }
.agcs .agcs-row:focus-visible, .agcs .agcs-item:focus-visible { box-shadow: 0 0 0 2px var(--agcs-maroon); outline: none; }
.agcs-thumb { width: 42px; height: 42px; border-radius: 10px; background: #f6efe6; color: var(--agcs-maroon); display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; }
.agcs-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.agcs-thumb--line { background: #fff; border: 1px solid #e6dfd6; }
.agcs-row-body { flex: 1; min-width: 0; display: block; }
.agcs-row-title { display: block; font-family: var(--agcs-head); font-weight: 700; font-size: 15px; line-height: 1.3; }
.agcs-row-sub { display: block; font-size: 12.5px; color: var(--agcs-faint); margin-top: 2px; line-height: 1.35; }
.agcs-chev { color: #9a8f86; display: flex; }

.agcs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.agcs-chips--row { padding: 0 10px 8px 64px; }
.agcs .agcs-chip, .agcs-results .agcs-chip { display: inline-block; border: 1px solid #e3dbd2; border-radius: 14px; padding: 4px 10px; font-size: 12.5px; color: #3a3a3a; background: #fff; line-height: 1.3; }
.agcs .agcs-chip:hover, .agcs .agcs-chip:focus, .agcs-results .agcs-chip:hover { border-color: var(--agcs-maroon); color: var(--agcs-maroon); }

/* Parts */
.agcs-part { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; }
.agcs-part:hover { background: var(--agcs-hover); }
.agcs-part-main { min-width: 0; }
.agcs-part-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; }
.agcs .agcs-pn, .agcs-results .agcs-pn { font-family: var(--agcs-body); font-size: 15px; color: var(--agcs-maroon); }
.agcs a.agcs-pn:hover, .agcs-results a.agcs-pn:hover { text-decoration: underline; }
.agcs-pname { font-family: var(--agcs-head); font-weight: 700; font-size: 15px; }
.agcs-badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--agcs-head); font-weight: 700; font-size: 11px; line-height: 1.4; padding: 2px 8px; border-radius: 9px; white-space: nowrap; }
.agcs-badge.is-stock { color: #1d6b33; background: #e5f3e8; }
.agcs-badge.is-ss { color: #7a4300; background: #fff1d6; font-family: var(--agcs-body); font-weight: 400; font-size: 12px; margin-bottom: 4px; }
.agcs-badge.is-nla { color: #4a4a4a; background: #ececec; font-size: 12px; }
.agcs .agcs-where { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--agcs-faint); line-height: 1.35; }
.agcs a.agcs-where svg { color: var(--agcs-maroon); flex-shrink: 0; }
.agcs a.agcs-where:hover span { text-decoration: underline; }
.agcs-part-act { display: flex; align-items: center; gap: 10px; }
.agcs-price { font-family: var(--agcs-head); font-weight: 700; font-size: 16px; white-space: nowrap; }

.agcs .agcs-cart, .agcs-results .agcs-cart { position: relative; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--agcs-maroon); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-family: var(--agcs-head); font-weight: 700; font-size: 13px; margin: 0; padding: 0; min-height: 0; text-transform: none; line-height: 1; }
.agcs .agcs-cart:hover, .agcs-results .agcs-cart:hover { background: #7d0b0b; }
.agcs-cart-ico { display: inline-flex; }
.agcs-cart-ok { display: none; }
.agcs-cart.is-busy { opacity: .6; cursor: progress; }
.agcs-cart.is-added { background: #1d6b33 !important; }
.agcs-cart.is-added .agcs-cart-ico { display: none; }
.agcs-cart.is-added .agcs-cart-ok { display: inline-flex; }
.agcs-cart.is-error { background: #b32d2e !important; }

.agcs .agcs-call, .agcs-results .agcs-call { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border: 1.5px solid var(--agcs-maroon); border-radius: 10px; color: var(--agcs-maroon); font-family: var(--agcs-head); font-weight: 700; font-size: 13px; white-space: nowrap; background: #fff; }
.agcs .agcs-call:hover, .agcs-results .agcs-call:hover { background: var(--agcs-hover); }

.agcs-hint { margin: 4px 10px 0; padding: 13px 15px; border: 1px dashed #dcd2c6; border-radius: 10px; color: var(--agcs-muted); font-size: 13.5px; line-height: 1.5; background: #fff; }
.agcs .agcs-hint a { display: block; margin-top: 8px; font-family: var(--agcs-head); font-weight: 700; color: var(--agcs-maroon); }
.agcs-pending { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--agcs-faint); font-size: 13.5px; margin: 0; }
.agcs-pending svg { color: var(--agcs-maroon); }
.agcs-spin { animation: agcsSpin .8s linear infinite; }
@keyframes agcsSpin { to { transform: rotate(360deg); } }
.agcs-skel { padding: 8px 10px; display: flex; flex-direction: column; gap: 11px; animation: agcsPulse 1.2s ease-in-out infinite; }
.agcs-skel i { display: block; height: 13px; border-radius: 7px; background: #ece5dc; }
.agcs-skel i:nth-child(1) { width: 62%; } .agcs-skel i:nth-child(2) { width: 84%; height: 10px; background: #f1ebe3; }
.agcs-skel i:nth-child(3) { width: 48%; margin-top: 6px; } .agcs-skel i:nth-child(4) { width: 76%; height: 10px; background: #f1ebe3; }
@keyframes agcsPulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.agcs-empty { padding: 6px 10px; margin: 0; color: var(--agcs-faint); font-size: 13.5px; }
.agcs .agcs-more { display: block; padding: 8px 10px; font-family: var(--agcs-head); font-weight: 700; font-size: 13.5px; color: var(--agcs-maroon); }

.agcs-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--agcs-line); background: #fff; position: sticky; bottom: 0; }
.agcs .agcs-foot a { font-family: var(--agcs-head); font-weight: 700; font-size: 14px; color: var(--agcs-maroon); }
.agcs-enter { color: var(--agcs-faint); font-size: 12.5px; white-space: nowrap; }
.agcs-enter kbd { border: 1px solid #d9d0c5; border-bottom-width: 2px; border-radius: 5px; padding: 1px 7px; font-size: 12px; color: #3a3a3a; background: #fff; font-family: inherit; box-shadow: none; }

.agcs-tip { padding: 10px 14px 16px; }
.agcs-tip p { margin: 4px 10px 0; color: var(--agcs-muted); font-size: 14px; line-height: 1.5; }
.agcs-none { padding: 24px 26px; }
.agcs-none-title { font-family: var(--agcs-head); font-weight: 700; font-size: 18px; }
.agcs-none p { margin: 6px 0 0; color: var(--agcs-muted); font-size: 14.5px; line-height: 1.5; max-width: 620px; }
.agcs .agcs-callbtn, .agcs-results .agcs-callbtn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; height: 44px; padding: 0 18px; border-radius: 22px; background: var(--agcs-maroon); color: #fff; font-family: var(--agcs-head); font-weight: 700; font-size: 15px; }
.agcs .agcs-callbtn:hover, .agcs-results .agcs-callbtn:hover { background: var(--agcs-maroon-dk); color: #fff; }
.agcs-small { font-size: 13px; }
.agcs-muted { color: var(--agcs-muted); }
.agcs-faint { color: var(--agcs-faint); }

/* ---- Narrow dropdowns: one column, parts first ---- */
@media (max-width: 900px) {
  .agcs-cols { grid-template-columns: minmax(0, 1fr); }
  .agcs-col--parts { order: -1; border-left: 0; border-bottom: 1px solid var(--agcs-line); }
}

/* ---- Phones: the box becomes a full-screen search ---- */
html.agcs-lock, html.agcs-lock body { overflow: hidden !important; }
@media (max-width: 768px) {
  .agcs.is-full { position: fixed; inset: 0; z-index: 100000; background: #fff; display: flex; flex-direction: column; padding: 0; }
  .agcs.is-full .agcs-form { padding: 12px 12px 10px 4px; border-bottom: 1px solid var(--agcs-line); flex-shrink: 0; }
  .agcs.is-full .agcs-back { display: inline-flex; }
  .agcs.is-full .agcs-input { height: 46px; border: 1.5px solid var(--agcs-maroon); border-radius: 23px; font-size: 16px; padding-left: 44px; box-shadow: none; }
  .agcs.is-full .agcs-ico { left: 15px; }
  .agcs.is-full .agcs-panel { position: static; transform: none; width: auto; max-height: none; flex: 1; border: 0; border-radius: 0; box-shadow: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .agcs-col { padding: 6px 4px 10px; }
  .agcs-chips--row { padding-left: 64px; }
  .agcs-part { padding: 11px 10px; }
  .agcs .agcs-cart { width: 44px; height: 44px; }
  .agcs .agcs-call { height: 44px; }
  .agcs-foot { padding: 12px 16px; }
  .agcs-enter { display: none; }
  .agcs-none { padding: 26px 18px; text-align: center; }
}

/* ================================================================== *
 *  Results page
 * ================================================================== */
.agcs-results { max-width: 1200px; margin: 0 auto; padding: 22px 20px 48px; font-family: var(--agcs-body); color: var(--agcs-ink); }
.agcs-results *, .agcs-results *::before, .agcs-results *::after { box-sizing: border-box; }
.agcs-results a { text-decoration: none; }
.agcs-crumbs { font-size: 13px; color: var(--agcs-faint); }
.agcs-crumbs a { color: var(--agcs-faint); }
.agcs-crumbs a:hover { color: var(--agcs-maroon); }
.agcs-results-box { max-width: 680px; margin: 16px 0 22px; }
.agcs-titlerow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.agcs-results .agcs-h1 { margin: 0; font-family: var(--agcs-head); font-weight: 700; font-size: 28px; line-height: 1.25; color: var(--agcs-ink); }
.agcs-results .agcs-h2 { margin: 30px 0 14px; font-family: var(--agcs-head); font-weight: 700; font-size: 18px; color: var(--agcs-ink); }
.agcs-tabs { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1px solid #e9e3dc; overflow-x: auto; }
.agcs-tabs a { padding: 11px 16px; margin-bottom: -1px; border-bottom: 3px solid transparent; font-family: var(--agcs-head); font-weight: 700; font-size: 14.5px; color: #3a3a3a; white-space: nowrap; }
.agcs-tabs a span { color: #8a8079; font-family: var(--agcs-body); font-weight: 400; }
.agcs-tabs a.is-on { border-bottom-color: var(--agcs-maroon); color: var(--agcs-maroon); }

.agcs-mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.agcs-mcard { border: 1px solid #e6dfd6; border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: border-color .12s, box-shadow .12s; }
.agcs-mcard:hover { border-color: #c9a9a4; box-shadow: 0 6px 18px rgba(60, 10, 10, .08); }
.agcs-mcard-img { height: 130px; background: #f6efe6; display: flex; align-items: center; justify-content: center; color: var(--agcs-maroon); }
.agcs-mcard-img img { max-width: 100%; max-height: 130px; object-fit: contain; }
.agcs-mcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.agcs-mcard-title { font-family: var(--agcs-head); font-weight: 700; font-size: 17px; color: var(--agcs-ink); }
.agcs-mcard .agcs-chips { margin-top: 10px; }
.agcs-results .agcs-go { margin-top: auto; padding-top: 12px; font-family: var(--agcs-head); font-weight: 700; font-size: 14px; color: var(--agcs-maroon); }

.agcs-dlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.agcs-dcard { display: flex; gap: 14px; align-items: center; border: 1px solid #e6dfd6; border-radius: 12px; padding: 12px; color: var(--agcs-ink); background: #fff; transition: border-color .12s, box-shadow .12s; }
.agcs-dcard:hover { border-color: #c9a9a4; box-shadow: 0 6px 18px rgba(60, 10, 10, .08); }
.agcs-dcard-ico { width: 56px; height: 56px; border-radius: 10px; border: 1px solid #ece6de; display: flex; align-items: center; justify-content: center; color: var(--agcs-maroon); flex-shrink: 0; }
.agcs-dcard-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agcs-dcard-title { font-family: var(--agcs-head); font-weight: 700; font-size: 15.5px; }
.agcs-dcard .agcs-go { margin: 0; padding: 0 6px 0 0; white-space: nowrap; font-size: 13.5px; }

.agcs-ptable { border: 1px solid #e6dfd6; border-radius: 12px; overflow: hidden; }
.agcs-prow { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.3fr) 100px 150px; gap: 16px; padding: 13px 18px; border-bottom: 1px solid #f0ebe5; align-items: center; }
.agcs-prow:last-child { border-bottom: 0; }
.agcs-prow:not(.agcs-phead):hover { background: #fbf6f4; }
.agcs-phead { background: #faf6f1; border-bottom: 2px solid var(--agcs-maroon); font-family: var(--agcs-head); font-weight: 700; font-size: 12.5px; color: #3a3a3a; padding-top: 10px; padding-bottom: 10px; }
.agcs-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.agcs-badges .agcs-badge.is-ss { margin-bottom: 0; }
.agcs-results .agcs-pname { display: block; }
.agcs-results .agcs-where { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.45; }
.agcs-results .agcs-where a { color: var(--agcs-muted); }
.agcs-results .agcs-where a:hover { color: var(--agcs-maroon); text-decoration: underline; }
.agcs-r { text-align: right; }
.agcs-results .agcs-price { display: block; }
.agcs-buy { display: flex; justify-content: flex-end; }
.agcs-results .agcs-cart--wide { width: auto; padding: 0 14px; }

.agcs-none { margin-top: 10px; }
.agcs-results .agcs-none p { color: var(--agcs-muted); line-height: 1.5; max-width: 640px; }
.agcs-callbox { margin-top: 36px; padding: 20px 24px; background: #faf6f1; border-radius: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.agcs-callbox strong { display: block; font-family: var(--agcs-head); font-size: 16px; }
.agcs-callbox .agcs-callbtn { margin-top: 0; flex-shrink: 0; }

@media (max-width: 900px) {
  .agcs-dlist { grid-template-columns: minmax(0, 1fr); }
  .agcs-prow { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .agcs-phead { display: none; }
  .agcs-prow > span:nth-child(1) { grid-column: 1; }
  .agcs-prow > span:nth-child(2) { grid-column: 1; }
  .agcs-prow > span:nth-child(3) { grid-column: 1; }
  .agcs-prow > span:nth-child(4) { grid-column: 2; grid-row: 1; }
  .agcs-prow > span:nth-child(5) { grid-column: 2; grid-row: 2 / span 2; align-self: start; }
}
@media (max-width: 600px) {
  .agcs-results .agcs-h1 { font-size: 23px; }
  .agcs-dcard .agcs-go { display: none; }
}

/* ================================================================== *
 *  Machine tag ("X4.70 ×") inside the box — [agc_search model="…"]
 *  With the tag, the field itself is the white rounded box and the
 *  input sits inside it, after the icon and the tag.
 * ================================================================== */
.agcs .agcs-scope { display: none; }
.agcs.has-scope .agcs-scope {
  display: inline-flex; align-items: center; gap: 2px; flex-shrink: 1; min-width: 0; max-width: 50%;
  height: 26px; padding: 0 3px 0 10px; border-radius: 13px; background: #f3e6e4; color: var(--agcs-maroon);
  font-family: var(--agcs-head); font-weight: 700; font-size: 12.5px; line-height: 1; white-space: nowrap; transition: opacity .15s;
}
.agcs .agcs-scope-name { overflow: hidden; text-overflow: ellipsis; }
.agcs .agcs-scope-x { width: 20px; height: 20px; border: 0; border-radius: 10px; background: transparent; color: var(--agcs-maroon); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.agcs .agcs-scope-x:hover, .agcs .agcs-scope-x:focus-visible { background: rgba(92, 0, 0, .14); outline: none; }
.agcs .agcs-scope.is-idle { opacity: .45; }

.agcs.has-scope .agcs-field { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 46px 0 15px; background: #fff; border: 1.5px solid var(--agcs-maroon); border-radius: 24px; }
.agcs.has-scope .agcs-field:focus-within { box-shadow: 0 0 0 4px rgba(92, 0, 0, .12); }
.agcs.has-scope .agcs-ico { position: static; transform: none; flex-shrink: 0; }
.agcs.has-scope .agcs-input { flex: 1; min-width: 60px; width: auto; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.agcs.has-scope .agcs-input:focus { box-shadow: none; }

.agcs .agcs-chips--tip { padding: 10px 10px 0; }
.agcs .agcs-unscope { display: block; margin: 10px 10px 0; padding: 0; border: 0; background: none; color: var(--agcs-maroon); font-family: var(--agcs-head); font-weight: 700; font-size: 13.5px; line-height: 1.4; text-align: left; }
.agcs .agcs-unscope:hover { text-decoration: underline; }
.agcs-none .agcs-unscope { margin: 14px 0 0; }
.agcs a.agcs-where.is-here { color: var(--agcs-maroon); font-weight: 700; }

/* ================================================================== *
 *  Diagram page banner — [agc_search context="diagram"]
 * ================================================================== */
.agcs .agcs-open { display: none; }
.agcs--diagram .agcs-input { height: 38px; border: 2px solid #fff; border-radius: 19px; font-size: 14.5px; padding: 0 40px 0 38px; }
.agcs--diagram .agcs-input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.agcs--diagram .agcs-ico { left: 13px; width: 17px; height: 17px; }
.agcs--diagram .agcs-clear { width: 28px; height: 28px; right: 5px; }
.agcs--diagram.has-scope .agcs-field { height: 38px; padding: 0 38px 0 12px; gap: 6px; border: 2px solid #fff; border-radius: 19px; }
.agcs--diagram.has-scope .agcs-field:focus-within { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.agcs--diagram.has-scope .agcs-input { height: 100%; padding: 0; border: 0; }
.agcs--diagram .agcs-scope { height: 24px; font-size: 12px; }
/* The box sits at the right of the banner, so the results open leftward from its right edge. */
.agcs--diagram .agcs-panel { left: auto; right: 0; transform: none; }

@media (max-width: 768px) {
  /* Phones: a round search button in the banner; tapping it opens the full-screen search. */
  .agcs--diagram:not(.is-full) { width: auto; }
  .agcs--diagram:not(.is-full) .agcs-form { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
  .agcs--diagram:not(.is-full) .agcs-open { display: inline-flex; width: 38px; height: 38px; border: 0; border-radius: 19px; background: #fff; color: var(--agcs-maroon); align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
  /* Full-screen search with the tag */
  .agcs.is-full.has-scope .agcs-field { height: 46px; padding: 0 44px 0 14px; border: 1.5px solid var(--agcs-maroon); border-radius: 23px; box-shadow: none; }
  .agcs.is-full.has-scope .agcs-input { height: 100%; padding: 0; border: 0; border-radius: 0; }
  .agcs.is-full .agcs-clear { width: 36px; height: 36px; right: 5px; }
}
