/* Wire Gh: live search, cookie choices and install prompt (public site and user portal) */
.wgx-x { background: none; border: 0; padding: 6px; color: #5d6b78; cursor: pointer; border-radius: 6px; display: inline-flex; flex: none; }
.wgx-x:hover { background: #eef1f4; color: #1c2b33; }
.wgx-btn { font: inherit; font-size: 14px; font-weight: 600; border-radius: 6px; padding: 10px 16px; cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.wgx-btn-solid { background: #0078d4; color: #fff; }
.wgx-btn-solid:hover { background: #0067b8; color: #fff; }
.wgx-btn-text { background: none; color: #0067b8; }
.wgx-btn-text:hover { text-decoration: underline; }

/* Search */
.wgx-search-btn { background: none; border: 0; padding: 8px; margin: 0 2px; color: #201f1e; cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; }
.wgx-search-btn:hover { background: #f3f2f1; }
.wgx-search { position: fixed; inset: 0; z-index: 2000; background: rgba(16, 24, 32, .5); display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.wgx-search[hidden], .wgx-modal[hidden], .wgx-cookie[hidden], .wgx-install[hidden] { display: none; }
.wgx-search-box { width: 100%; max-width: 620px; background: #fff; border-radius: 8px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); overflow: hidden; }
.wgx-search-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid #e3e7ec; color: #5d6b78; }
.wgx-search-bar input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 8px 0; color: #1c2b33; background: none; }
.wgx-search-bar input::-webkit-search-cancel-button { display: none; }
.wgx-search-list { max-height: min(56vh, 460px); overflow-y: auto; }
.wgx-search-group { padding: 10px 16px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #5d6b78; }
.wgx-search-item { display: block; padding: 9px 16px; color: #1c2b33; text-decoration: none; }
.wgx-search-item strong { display: block; font-size: 14.5px; font-weight: 600; }
.wgx-search-item span { display: block; font-size: 13px; color: #5d6b78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wgx-search-item:hover, .wgx-search-item.is-on { background: #f1f4f7; }
.wgx-search-empty { padding: 22px 16px; color: #5d6b78; font-size: 14px; text-align: center; }
.wgx-search-foot { padding: 8px 16px; border-top: 1px solid #e3e7ec; font-size: 12px; color: #5d6b78; }

/* Cookie banner */
.wgx-cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1900; background: #fff; border-top: 1px solid #d5dbe1; box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
  display: flex; align-items: center; gap: 20px; padding: 14px 28px; }
.wgx-cookie p { margin: 0; flex: 1; font-size: 13.5px; line-height: 1.5; color: #3b4854; }
.wgx-cookie-btns { display: flex; align-items: center; gap: 8px; flex: none; }

/* Preference centre */
.wgx-modal { position: fixed; inset: 0; z-index: 2100; background: rgba(16, 24, 32, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wgx-modal-box { width: 100%; max-width: 560px; max-height: 92vh; background: #fff; border-radius: 6px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.wgx-modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 12px 22px; border-bottom: 1px solid #e3e7ec; font-size: 16px; }
.wgx-modal-head .wgx-x { margin-left: auto; }
.wgx-modal-body { padding: 18px 26px 8px; overflow-y: auto; font-size: 13.5px; line-height: 1.55; color: #3b4854; }
.wgx-modal-body h2 { font-size: 17px; margin: 0 0 10px; color: #1c2b33; }
.wgx-modal-body h3 { font-size: 15px; margin: 22px 0 10px; color: #1c2b33; }
.wgx-modal-body p { margin: 0 0 10px; }
.wgx-modal-body a { color: #0067b8; }
.wgx-pref { display: flex; align-items: flex-start; gap: 12px; border: 1px solid #d5dbe1; border-bottom-width: 0; padding: 11px 12px; }
.wgx-pref:last-child { border-bottom-width: 1px; }
.wgx-pref details { flex: 1; min-width: 0; }
.wgx-pref summary { font-weight: 700; color: #1c2b33; cursor: pointer; list-style: none; padding-left: 20px; position: relative; }
.wgx-pref summary::-webkit-details-marker { display: none; }
.wgx-pref summary::before { content: '+'; position: absolute; left: 0; top: -1px; font-weight: 400; font-size: 17px; }
.wgx-pref details[open] summary::before { content: '\2212'; }
.wgx-pref details p { margin: 8px 0 2px 20px; font-size: 13px; }
.wgx-always { color: #0067b8; font-weight: 700; font-size: 13px; white-space: nowrap; }
.wgx-switch { position: relative; flex: none; cursor: pointer; }
.wgx-switch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.wgx-switch span { display: block; width: 44px; height: 24px; border-radius: 12px; background: #8a96a3; transition: background .15s; position: relative; }
.wgx-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.wgx-switch input:checked + span { background: #0078d4; }
.wgx-switch input:checked + span::after { transform: translateX(20px); }
.wgx-switch input:focus-visible + span { outline: 2px solid #1c2b33; outline-offset: 2px; }
.wgx-switch em { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wgx-modal-foot { padding: 14px 22px; border-top: 1px solid #e3e7ec; display: flex; justify-content: flex-end; }

/* Install prompt */
.wgx-install { position: fixed; z-index: 1800; left: 16px; bottom: 16px; max-width: 400px; background: #fff; border: 1px solid #d5dbe1; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .14); display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 14px; }
.wgx-install img { border-radius: 10px; border: 1px solid #e3e7ec; flex: none; }
.wgx-install-text { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; color: #5d6b78; }
.wgx-install-text strong { display: block; font-size: 14.5px; color: #1c2b33; }
.wgx-install .wgx-btn { padding: 8px 14px; }

@media (max-width: 760px) {
  .wgx-cookie { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 16px; }
  .wgx-cookie-btns { justify-content: flex-end; flex-wrap: wrap; }
  .wgx-install { left: 10px; right: 10px; bottom: 74px; max-width: none; }
  .wgx-modal-body { padding: 16px 16px 6px; }
  .wgx-search { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .wgx-switch span, .wgx-switch span::after { transition: none; } }
.wgx-btn[hidden], .wgx-x[hidden] { display: none; }
