/* Quick actions popup opened by the + button (quick-ui.js).
   Always dark, in both themes: one small glass card that floats above the +. */
.qa-shade {
  position: fixed; inset: 0; z-index: 940;
  background: rgba(10, 12, 14, 0.18);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.18s ease;
}
.qa-shade.on { opacity: 1; }
:root[data-theme="dark"] .qa-shade { background: rgba(0, 0, 0, 0.45); }

.qa-pop {
  position: fixed; z-index: 960; right: 28px; bottom: 100px;
  width: 336px; padding: 8px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  border-radius: 26px;
  background: rgba(22, 24, 27, 0.94);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 48px -16px rgba(10, 12, 14, 0.55), 0 2px 6px rgba(10, 12, 14, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform-origin: calc(100% - 30px) 100%;
  opacity: 0; transform: translateY(10px) scale(0.94);
  transition: opacity 0.16s ease, transform 0.22s cubic-bezier(0.32, 0.72, 0, 1);
}
.qa-pop.on { opacity: 1; transform: none; }
.qa-pop.cols-4 { grid-template-columns: repeat(4, 1fr); width: 372px; }

.qa-tile {
  display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0;
  padding: 14px 4px 12px; border: 0; border-radius: 20px; cursor: pointer;
  background: none; color: var(--n-hair); font: inherit; text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.12s ease;
  opacity: 0; transform: translateY(6px);
}
.qa-pop.on .qa-tile { opacity: 1; transform: none; transition: opacity 0.2s ease calc(var(--i) * 22ms), transform 0.26s cubic-bezier(0.32, 0.72, 0, 1) calc(var(--i) * 22ms), background 0.15s ease; }
.qa-tile:hover, .qa-tile:focus-visible { background: rgba(255, 255, 255, 0.06); outline: none; }
.qa-pop.on .qa-tile:active { transform: scale(0.95); transition-delay: 0s; }
.qa-tile b { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qa-meta { font-size: 11px; color: #8d9298; line-height: 1.25; margin-top: -4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }

.qa-ic {
  position: relative; width: 46px; height: 46px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.07); color: #f3f4f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.qa-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.qa-tile.primary .qa-ic {
  background: linear-gradient(180deg, #34d36c, #1fb457); color: #052e14;
  box-shadow: 0 8px 22px -6px rgba(var(--acc-400-rgb), 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.qa-tile.primary .qa-ic svg { stroke-width: 2; }
.qa-tile.blue .qa-ic { color: #7cb6ff; }
.qa-tile.amber .qa-ic { color: #fbbf5a; }
.qa-tile.violet .qa-ic { color: #c4b5fd; }
.qa-tile.live .qa-ic { color: var(--acc-400); box-shadow: inset 0 0 0 1px rgba(var(--acc-400-rgb), 0.35), 0 0 18px -4px rgba(var(--acc-400-rgb), 0.5); }
.qa-tile.live .qa-ic svg { fill: currentColor; }
.qa-tile.done .qa-meta { color: var(--acc-400); }
.qa-tick {
  position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--acc-500); color: #052e14; box-shadow: 0 0 0 2px var(--n-hero), 0 0 10px rgba(var(--acc-400-rgb), 0.6);
}
.qa-tick svg { width: 11px; height: 11px; stroke-width: 3; }

/* The + turns into a close button while the popup is open. */
.fab .ico { transition: transform 0.22s cubic-bezier(0.32, 0.72, 0, 1); }
body.qa-open .fab { z-index: 965; background: var(--n-hero); color: var(--acc-400); box-shadow: 0 12px 28px -8px rgba(10, 12, 14, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 22px -6px rgba(var(--acc-400-rgb), 0.55); }
body.qa-open .fab .ico { transform: rotate(45deg); }

@media (max-width: 600px) {
  .qa-pop, .qa-pop.cols-4 {
    right: auto; left: 50%; width: min(352px, calc(100vw - 32px));
    bottom: calc(112px + env(safe-area-inset-bottom));
    margin-left: calc(min(352px, calc(100vw - 32px)) / -2);
    transform-origin: 50% 100%;
  }
  .qa-pop.cols-4 { width: min(372px, calc(100vw - 32px)); margin-left: calc(min(372px, calc(100vw - 32px)) / -2); }
  .qa-pop.cols-4 .qa-ic { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .qa-pop, .qa-tile, .qa-pop.on .qa-tile, .fab .ico { transition: opacity 0.12s ease !important; transform: none !important; }
}
