/* =====================================================================
   Quick Action (Ctrl K / ⌘K) — Shopeers style
   Styles: data-style="default" | "spotlight" | "sidebar" | "compact"
   ===================================================================== */
.sp-qa { position: fixed; inset: 0; z-index: 2050; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; background: var(--sp-overlay); opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility 0s linear .18s; }
.sp-qa.is-open { opacity: 1; visibility: visible; transition: opacity .18s ease, visibility 0s; }
.sp-qa-panel {
  width: 640px; max-width: 100%; max-height: min(620px, 76vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--sp-surface); border: 1px solid var(--sp-border); border-radius: var(--sp-radius-xl);
  box-shadow: var(--sp-shadow-lg); font-family: var(--sp-font);
  transform: translateY(-8px) scale(.98); transition: transform .22s var(--sp-ease);
}
.sp-qa.is-open .sp-qa-panel { transform: none; }

.sp-qa-head { flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--sp-divider); }
.sp-qa-head > iconify-icon { font-size: 1.25rem; color: var(--sp-muted); }
.sp-qa-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 .95rem var(--sp-font); color: var(--sp-text); }
.sp-qa-input::placeholder { color: var(--sp-placeholder); font-weight: 400; }
.sp-qa-input::-webkit-search-cancel-button { display: none; }

.sp-qa-scopes { flex-shrink: 0; display: flex; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--sp-divider); overflow-x: auto; scrollbar-width: none; }
.sp-qa-scopes::-webkit-scrollbar { display: none; }
.sp-qa-scope { flex-shrink: 0; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--sp-border); background: var(--sp-surface); color: var(--sp-text-2); font: 500 .74rem var(--sp-font); display: inline-flex; align-items: center; gap: 5px; }
.sp-qa-scope:hover { border-color: var(--sp-border-strong); color: var(--sp-text); }
.sp-qa-scope.is-active { background: var(--sp-primary-soft); border-color: var(--sp-primary-soft-2); color: var(--sp-primary-text); }
.sp-qa-scope .n { font-size: .66rem; color: var(--sp-subtle); }
.sp-qa-scope.is-active .n { color: var(--sp-primary-text); opacity: .7; }

.sp-qa-list { flex: 1; overflow-y: auto; padding: 6px 8px 8px; }
.sp-qa-group { padding: 10px 10px 6px; font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--sp-subtle); }
.sp-qa-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--sp-radius); color: var(--sp-text-2); text-decoration: none; cursor: pointer; scroll-margin: 8px; }
.sp-qa-item:hover { color: var(--sp-text-2); }
.sp-qa-item.is-active { background: var(--sp-surface-hover); color: var(--sp-text); }
[data-bs-theme="dark"] .sp-qa-item.is-active { background: var(--sp-surface-3); }
.sp-qa-ico { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; border: 1px solid var(--sp-border); background: var(--sp-surface); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; color: var(--sp-text-2); }
.sp-qa-item.is-active .sp-qa-ico { border-color: var(--sp-primary-soft-2); background: var(--sp-primary-soft); color: var(--sp-primary); }
.sp-qa-item.is-ai .sp-qa-ico { border: 0; color: #fff; background: radial-gradient(circle at 35% 30%, #8fc0ff 0%, #3084f7 35%, #2162e2 75%); box-shadow: 0 6px 12px -4px rgba(34, 100, 255, .6); }
.sp-qa-text { flex: 1; min-width: 0; }
.sp-qa-label { font-size: .84rem; font-weight: 500; color: var(--sp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-qa-label mark { background: transparent; color: var(--sp-primary-text); padding: 0; font-weight: 600; }
.sp-qa-sub { font-size: .72rem; color: var(--sp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-qa-meta { display: flex; gap: 3px; flex-shrink: 0; }
.sp-qa-meta kbd { height: 20px; min-width: 20px; font-size: .64rem; padding: 0 5px; }
.sp-qa-enter { font-size: .9rem; color: var(--sp-subtle); opacity: 0; }
.sp-qa-item.is-active .sp-qa-enter { opacity: 1; }
.sp-qa-empty { padding: 36px 16px; text-align: center; color: var(--sp-muted); font-size: .82rem; }
.sp-qa-empty iconify-icon { font-size: 1.8rem; color: var(--sp-subtle); display: block; margin: 0 auto 8px; }

.sp-qa-foot { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 16px; border-top: 1px solid var(--sp-divider); background: var(--sp-surface-2); font-size: .7rem; color: var(--sp-muted); }
.sp-qa-foot span { display: inline-flex; align-items: center; gap: 5px; }
.sp-qa-foot kbd { height: 20px; min-width: 20px; font-size: .64rem; padding: 0 5px; }
.sp-qa-foot .sp-qa-brand { margin-left: auto; color: var(--sp-subtle); }

/* ── Spotlight: big floating input, glassy, results under ── */
.sp-qa[data-style="spotlight"] { align-items: center; justify-content: center; padding: 24px 16px; background: color-mix(in srgb, var(--sp-overlay) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sp-qa[data-style="spotlight"] .sp-qa-panel { width: 720px; border-radius: 24px; background: color-mix(in srgb, var(--sp-surface) 92%, transparent); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); }
.sp-qa[data-style="spotlight"] .sp-qa-head { padding: 20px 22px; }
.sp-qa[data-style="spotlight"] .sp-qa-head > iconify-icon { font-size: 1.6rem; color: var(--sp-primary); }
.sp-qa[data-style="spotlight"] .sp-qa-input { font-size: 1.3rem; font-weight: 500; letter-spacing: -.02em; }
.sp-qa[data-style="spotlight"] .sp-qa-foot { background: transparent; }

/* ── Sidebar: right-side panel, full height ── */
.sp-qa[data-style="sidebar"] { padding: 10px; justify-content: flex-end; align-items: stretch; }
.sp-qa[data-style="sidebar"] .sp-qa-panel { width: 440px; max-height: none; height: 100%; transform: translateX(24px); }
.sp-qa[data-style="sidebar"].is-open .sp-qa-panel { transform: none; }

/* ── Compact: small, no scopes, no footer ── */
.sp-qa[data-style="compact"] { padding-top: 10vh; }
.sp-qa[data-style="compact"] .sp-qa-panel { width: 500px; border-radius: var(--sp-radius-lg); }
.sp-qa[data-style="compact"] .sp-qa-scopes, .sp-qa[data-style="compact"] .sp-qa-foot { display: none; }
.sp-qa[data-style="compact"] .sp-qa-head { padding: 11px 14px; }
.sp-qa[data-style="compact"] .sp-qa-ico { width: 28px; height: 28px; border: 0; background: transparent; }
.sp-qa[data-style="compact"] .sp-qa-sub { display: none; }

@media (max-width: 575.98px) {
  .sp-qa, .sp-qa[data-style="spotlight"] { padding: 0; align-items: stretch; }
  .sp-qa .sp-qa-panel, .sp-qa[data-style] .sp-qa-panel { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .sp-qa-meta { display: none; }
}
