/* ================================================================
   AN SuperSearch Patch 2 — patch2.css
   ONLY patches what's broken. No new features that cause clutter.
   ================================================================ */

/* ── 1. HIDE old booster hub entirely (JS rebuilds it cleanly) ── */
#anssb-hub { display: none !important; }

/* ── 2. NEW HUB — injected by patch2.js with id #ansp2-hub ───── */

/* FAB button — centered bottom on mobile */
#ansp2-fab {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: all;
}

#ansp2-fab-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(90,158,111,0.4);
  background: radial-gradient(circle at 38% 32%, #1d2e22, #0c1810);
  box-shadow:
    0 0 0 7px rgba(90,158,111,0.07),
    0 10px 32px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.07);
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease,
              background 0.3s ease;
  overflow: hidden;
}
#ansp2-fab-btn:active {
  transform: scale(0.93);
}
#ansp2-fab-btn.open {
  background: radial-gradient(circle at 38% 32%, #2e1010, #140808);
  border-color: rgba(239,68,68,0.35);
  box-shadow: 0 0 0 7px rgba(239,68,68,0.06), 0 10px 32px rgba(0,0,0,0.55);
}

/* Pulse ring */
#ansp2-fab-btn::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(90,158,111,0.45);
  animation: ansp2-ring 2.4s ease-out infinite;
  pointer-events: none;
}
#ansp2-fab-btn.open::before { display: none; }
@keyframes ansp2-ring {
  0%   { transform: scale(1);    opacity: 0.8; }
  80%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* SVG leaf area inside FAB */
#ansp2-fab-leaf {
  position: absolute;
  inset: 11px;
  transition: opacity 0.2s;
}
#ansp2-fab-leaf svg { width: 100%; height: 100%; }

/* X close icon inside FAB — hidden when closed */
#ansp2-fab-x {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(239,68,68,0.85);
  font-size: 20px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
#ansp2-fab-btn.open #ansp2-fab-leaf { opacity: 0.15; }
#ansp2-fab-btn.open #ansp2-fab-x    { opacity: 1; }

/* Label below FAB */
#ansp2-fab-label {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.55);
  background: rgba(8,18,12,0.82);
  border: 1px solid rgba(90,158,111,0.18);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

/* ── 3. HUB PANEL ─────────────────────────────────────────────── */
#ansp2-panel {
  position: fixed;
  /* sits above FAB with gap */
  bottom: 100px;
  /* centered horizontally with safe margins */
  left: 12px;
  right: 12px;
  width: auto;
  max-height: calc(100vh - 130px);
  z-index: 99998;
  background: rgba(7, 16, 11, 0.97);
  backdrop-filter: saturate(160%) blur(28px);
  -webkit-backdrop-filter: saturate(160%) blur(28px);
  border: 1px solid rgba(90,158,111,0.2);
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 28px 70px rgba(0,0,0,0.7);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  /* hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.97);
  transform-origin: bottom center;
  transition:
    opacity 0.28s ease,
    transform 0.36s cubic-bezier(0.34,1.56,0.64,1);
  font-family: 'DM Sans', -apple-system, sans-serif;
}
#ansp2-panel::-webkit-scrollbar { display: none; }
#ansp2-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: none;
}

/* Panel header */
.ansp2-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ansp2-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: radial-gradient(circle at 38% 32%, #1d2e22, #0c1810);
  border: 1px solid rgba(90,158,111,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  padding: 6px;
}
.ansp2-logo svg { width: 100%; height: 100%; }
.ansp2-title { font-size: 14px; font-weight: 700; color: #fff; }
.ansp2-sub   { font-size: 11px; color: rgba(255,255,255,0.36); margin-top: 2px; }

/* Search row */
.ansp2-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 14px 0;
  padding: 11px 14px;
  background: rgba(90,158,111,0.08);
  border: 1.5px solid rgba(90,158,111,0.2);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}
.ansp2-search:active {
  background: rgba(90,158,111,0.16);
  border-color: rgba(90,158,111,0.38);
}
.ansp2-search-icon { font-size: 15px; flex-shrink: 0; }
.ansp2-search-text { flex: 1; font-size: 13px; color: rgba(255,255,255,0.45); }
.ansp2-search-kbd  {
  font-size: 10px; font-weight: 700;
  color: rgba(90,158,111,0.7);
  border: 1px solid rgba(90,158,111,0.25);
  padding: 2px 8px; border-radius: 6px;
  background: rgba(90,158,111,0.07);
}

/* Section label */
.ansp2-section {
  font-size: 9px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,0.25);
  padding: 16px 18px 7px;
  display: flex; align-items: center; gap: 8px;
}
.ansp2-section::after { content:''; flex:1; height:1px; background:rgba(255,255,255,0.05); }

/* Category grid */
.ansp2-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 0 14px 4px;
}
.ansp2-cat {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
  min-width: 0;
  cursor: pointer;
}
.ansp2-cat:active {
  background: rgba(90,158,111,0.14);
  border-color: rgba(90,158,111,0.28);
  color: #fff;
}
.ansp2-cat-name {
  flex: 1; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis;
  min-width: 0;
}
.ansp2-cat-count {
  flex-shrink: 0; font-size: 9px;
  color: rgba(255,255,255,0.22); font-weight: 700;
  background: rgba(255,255,255,0.05);
  padding: 2px 5px; border-radius: 5px;
}

/* Links */
.ansp2-links { padding: 4px 10px 10px; }
.ansp2-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  text-decoration: none; color: rgba(255,255,255,0.68);
  font-size: 13px; font-weight: 500; transition: all 0.15s;
}
.ansp2-link:active { background: rgba(255,255,255,0.06); color: #fff; }
.ansp2-link-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.ansp2-link-arrow { margin-left: auto; color: rgba(255,255,255,0.15); font-size: 12px; }

/* Stats */
.ansp2-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4px;
}
.ansp2-stat {
  padding: 12px 8px; text-align: center;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.ansp2-stat:last-child { border-right: none; }
.ansp2-stat-num { font-size: 16px; font-weight: 800; color: #7dd3a2; letter-spacing: -0.02em; }
.ansp2-stat-lbl { font-size: 9px; color: rgba(255,255,255,0.25); margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ── 4. PILL UPGRADES (subtle, no clutter) ─────────────────── */
#anss-pill.ansp2-glow {
  box-shadow:
    0 4px 24px rgba(0,0,0,0.12),
    0 0 0 3px rgba(90,158,111,0.28),
    0 0 16px rgba(90,158,111,0.12),
    inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* ── 5. DESKTOP — right-aligned panel ────────────────────────── */
@media (min-width: 600px) {
  #ansp2-fab {
    bottom: 28px;
    right: 24px;
    left: auto;
    transform: none;
    align-items: flex-end;
  }
  #ansp2-fab-label { display: none; }
  #ansp2-panel {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    left: auto;
    width: 310px;
    max-height: 80vh;
    transform-origin: bottom right;
  }
  /* Wrap fab + panel together on desktop */
  #ansp2-fab {
    position: fixed;
    bottom: 28px;
    right: 24px;
    left: auto;
    transform: none;
  }
}

/* ── 6. Body scroll lock when panel open on mobile ──────────── */
body.ansp2-open { overflow: hidden !important; }
