/* Search header */
.wr-header { position: sticky; top: 0; z-index: 5; display: flex; gap: .5rem;
  align-items: center; padding: .5rem .75rem; background: var(--bg, #fff);
  border-bottom: 1px solid rgba(0,0,0,.1); }
#wr-search { flex: 1; font: inherit; padding: .4rem .6rem; }
#wr-results { position: absolute; top: 100%; left: .75rem; right: .75rem;
  margin: 0; padding: 0; list-style: none; background: var(--bg, #fff);
  border: 1px solid rgba(0,0,0,.15); max-height: 60vh; overflow: auto; }
#wr-results:empty { display: none; }
.wr-result { display: block; width: 100%; text-align: left; padding: .5rem .6rem;
  border: 0; background: none; font: inherit; cursor: pointer; }
.wr-result:hover { background: rgba(0,0,0,.06); }

/* Transient load-error banner */
#wr-error { position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding: .6rem .9rem; background: #b00020; color: #fff; font: inherit; text-align: center; }
#wr-error[hidden] { display: none; }

/* Cards (infobox / wide table) */
.wr-card { display: inline-block; max-width: 100%; margin: .5rem 0; padding: .5rem .75rem;
  border: 1px solid rgba(0,0,0,.2); border-radius: .4rem; background: rgba(0,0,0,.03);
  font: inherit; cursor: pointer; }
.wr-card::before { content: "\25A4  "; opacity: .6; } /* card glyph */

/* Overlay */
.wr-overlay { position: fixed; inset: 0; z-index: 20; }
.wr-overlay[hidden] { display: none; }
.wr-overlay-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.wr-overlay-panel { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 720px); max-height: 85vh; overflow: auto; background: var(--bg, #fff);
  border-radius: .6rem .6rem 0 0; padding: 1rem 1.25rem; }
.wr-overlay-close { float: right; font-size: 1.4rem; line-height: 1; border: 0;
  background: none; cursor: pointer; }
.wr-overlay-body table { width: 100%; border-collapse: collapse; }
.wr-overlay-body th, .wr-overlay-body td { border: 1px solid rgba(0,0,0,.15);
  padding: .3rem .5rem; text-align: left; }
