/*! wz-docs.css - styles for wz-docs.js (docs page layout: legal pages + FAQ).
 * Keep BYTE-IDENTICAL in both copies:
 *   article-website/src/assets/css/wz-docs.css
 *   warzone-web/warzone-web/wwwroot/css/wz-docs.css
 * Only the parts the script builds or toggles live here (search box + results, paperclip states,
 * the jump highlight); the page layout itself is Tailwind (design-system.md § 7.13).
 * Colours: Tailwind neutral scale + the site's brand RGB triplets (--brand-400 / --brand-500), so
 * seasonal and regional themes re-tint it.
 */

/* ---- search box ---- */
[data-wz-docs-search] { position: relative; }
.wzd-search { position: relative; }
.wzd-search-icon {
  position: absolute; left: .875rem; top: 50%; width: 1.125rem; height: 1.125rem;
  transform: translateY(-50%); color: #737373; pointer-events: none;
}
.wzd-input {
  display: block; width: 100%; height: 3rem; margin: 0; padding: 0 2.75rem 0 2.75rem;
  border: 1px solid #262626; border-radius: .75rem; background: rgb(23 23 23 / .72);
  color: #fff; font: inherit; font-size: 1rem; line-height: 1.5; outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.wzd-input::placeholder { color: #737373; opacity: 1; }
.wzd-input:hover { border-color: #404040; }
.wzd-input:focus { border-color: rgb(var(--brand-500) / .7); box-shadow: 0 0 0 3px rgb(var(--brand-500) / .18); background: rgb(23 23 23 / .9); }
.wzd-input::-webkit-search-cancel-button, .wzd-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.wzd-clear {
  position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: .5rem; background: none; color: #a3a3a3;
  cursor: pointer; visibility: hidden;
}
[data-has-query] .wzd-clear { visibility: visible; }
.wzd-clear:hover { color: #fff; background: #262626; }
.wzd-clear:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 1px; }
.wzd-clear svg { width: 1rem; height: 1rem; }

/* ---- results ---- */
[data-wz-docs] ul.wzd-results {
  position: absolute; left: 0; right: 0; top: calc(100% + .375rem); z-index: 30;
  max-height: min(26rem, 60vh); overflow-y: auto; margin: 0; padding: .375rem; list-style: none;
  border: 1px solid #404040; border-radius: .75rem; background: rgb(10 10 10 / .97);
  box-shadow: 0 20px 48px rgb(0 0 0 / .55); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
[data-wz-docs] ul.wzd-results[hidden] { display: none; }
[data-wz-docs] ul.wzd-results > li { margin: 0; padding: 0; }
[data-wz-docs] ul.wzd-results > li::before, [data-wz-docs] ul.wzd-results > li::marker { content: none; }
.wzd-opt { display: block; padding: .55rem .75rem !important; border-radius: .5rem; cursor: pointer; line-height: 1.45; }
.wzd-opt:hover, .wzd-opt[aria-selected="true"] { background: rgb(var(--brand-500) / .12); }
.wzd-crumb {
  display: block; margin-bottom: .1rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-size: .75rem; font-weight: 600; color: rgb(var(--brand-400));
}
.wzd-snip { display: block; font-size: .875rem; color: #d4d4d4; }
.wzd-results mark { background: rgb(var(--brand-500) / .35); color: #fff; border-radius: .2rem; padding: 0 .1em; }
.wzd-empty { padding: .7rem .75rem !important; font-size: .875rem; color: #a3a3a3; }

/* ---- the block a result jumps to ---- */
[data-wz-docs-hit] {
  border-radius: .375rem; background-color: rgb(var(--brand-500) / .14);
  box-shadow: 0 0 0 .375rem rgb(var(--brand-500) / .14); transition: background-color .8s, box-shadow .8s;
}
[data-wz-docs-hit="out"] { background-color: transparent; box-shadow: 0 0 0 .375rem transparent; }

/* ---- paperclip (copy the section's link) - CopyButton contract: green outline + check for 3 s ---- */
[data-wz-docs] a.wzd-permalink {
  flex: none; display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-top: .125em;
  border-radius: .375rem; color: #737373; text-decoration: none; transition: color .15s, background-color .15s;
}
[data-wz-docs] h3 a.wzd-permalink { width: 1.5rem; height: 1.5rem; margin-top: .0625em; }
[data-wz-docs] a.wzd-permalink:hover { color: rgb(var(--brand-400)); background: rgb(38 38 38 / .7); }
[data-wz-docs] a.wzd-permalink:focus-visible { outline: 2px solid rgb(var(--brand-500)); outline-offset: 1px; }
[data-wz-docs] a.wzd-permalink svg { width: 1.05rem; height: 1.05rem; }
[data-wz-docs] h3 a.wzd-permalink svg { width: .95rem; height: .95rem; }
[data-wz-docs] a.wzd-permalink .wzd-icon-done { display: none; }
[data-wz-docs] a.wzd-permalink[data-copied] { color: #34d399; outline: 1px solid #34d399; outline-offset: -1px; }
[data-wz-docs] a.wzd-permalink[data-copied] .wzd-icon-link { display: none; }
[data-wz-docs] a.wzd-permalink[data-copied] .wzd-icon-done { display: block; }
@media (pointer: coarse) { [data-wz-docs] a.wzd-permalink { width: 2.25rem; height: 2.25rem; margin: -.25rem 0 -.25rem -.25rem; } }
