/* ============================================================
   ux.css — standalone-site polish on top of the original V11 styles
   ============================================================ */

/* Page background behind the app (was transparent for portal embed) */
html, body { background: #e8efee; height: 100%; height: 100dvh; }
html[data-theme="dark"], html[data-theme="dark"] body { background: #0b0d13; }
#app { height: 100%; height: 100dvh; }

/* Keyboard focus that's visible (accessibility) */
[role="button"]:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2.5px solid var(--accent, #2aa874); outline-offset: 2px;
}
.prod-card, .tool-card, .calc-card, .info-strip, .pq-banner { -webkit-user-select: none; user-select: none; }

.pq-boot-error {
  position: fixed; inset: 0; z-index: 9998; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--bg, #f4f7f6); color: var(--text, #1a202c); font: 600 14px 'DM Sans', sans-serif; padding: 24px; text-align: center;
}
.pq-boot-error button { background: #0a7149; color: #fff; border: 0; border-radius: 10px; padding: 10px 22px; font: 700 14px 'DM Sans', sans-serif; cursor: pointer; }

/* Home banners (Agent Training etc.) — same look as V11, now data-driven */
.pq-banner {
  cursor: pointer; border-radius: 16px; padding: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18); transition: transform .15s;
}
.pq-banner:active { transform: scale(.98); }
.pq-banner-ico { width: 48px; height: 48px; flex-shrink: 0; background: rgba(255, 255, 255, .2); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.pq-banner-txt { flex: 1; min-width: 0; }
.pq-banner-t { font-weight: 800; font-size: 15px; color: #fff; margin-bottom: 3px; }
.pq-banner-s { font-size: 11.5px; color: rgba(255, 255, 255, .82); line-height: 1.4; }
.pq-banner-arw { color: #fff; font-size: 22px; font-weight: 300; }

.pq-updated { text-align: center; font-size: 11px; color: var(--text-3); padding: 14px 0 2px; }

/* Search: "mentioned inside" results */
.sr-section { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 10px 2px 2px; }
.sr-item mark { background: #fff3a8; color: inherit; border-radius: 3px; padding: 0 1px; }
html[data-theme="dark"] .sr-item mark { background: #5c4f00; }

/* Bottom bars: install prompt + update notice */
.pq-toast-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 500;
  width: calc(100% - 24px); max-width: 406px; display: flex; align-items: center; gap: 10px;
  background: #102a27; color: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  font: 500 13px 'DM Sans', sans-serif; animation: pqUp .3s ease-out;
}
.pq-toast-bar > span { flex: 1; }
.pq-toast-bar button { border: 0; border-radius: 9px; padding: 8px 14px; font: 700 13px 'DM Sans', sans-serif; cursor: pointer; background: #2aa874; color: #fff; }
.pq-install img { width: 36px; height: 36px; border-radius: 9px; background: #fff; }
.pq-install .pqi-t { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.pq-install .pqi-t span { font-size: 11.5px; opacity: .8; }
.pq-install .pqi-x { background: transparent; padding: 6px; opacity: .7; }
@keyframes pqUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Preview mode inside the editor: hide install/update bars */
.pq-preview .pq-toast-bar { display: none !important; }
