/* ============================================================
 * categorias.css — Tabs filtro + cards bloqueados
 * Aditivo ao design system existente. Usa --purple/--teal vars.
 * ============================================================ */

/* ─── GRID CONTÍNUO no admin (display:contents funciona ali) ─── */
#ferrSections.cat-flat {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 16px !important;
}
#ferrSections.cat-flat .ferr-section,
#ferrSections.cat-flat .ferr-section-grid {
  display: contents !important;
  margin: 0 !important;
}
#ferrSections.cat-flat .ferr-section-header { display: none !important; }

/* Cliente: cards já vêm direto no grid (estrutura plana). Só filter por data-attr. */
#cli-ferramentas [data-cat-hidden="1"] { display: none !important; }
#ferrSections.cat-flat [data-cat-hidden="1"] { display: none !important; }

/* ─── BARRA DE TABS ─── */
.cat-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px;
  background: rgba(20, 20, 35, 0.4);
  border: 1px solid rgba(155, 39, 175, 0.18);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.65);
  font: 600 13px/1 "Space Grotesk", "Inter", sans-serif;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.cat-tab:hover {
  background: rgba(155, 39, 175, 0.12);
  color: #fff;
  transform: translateY(-1px);
}

.cat-tab.active {
  background: linear-gradient(135deg, rgba(155, 39, 175, 0.22), rgba(0, 196, 167, 0.18));
  border-color: rgba(155, 39, 175, 0.45);
  color: #fff;
  box-shadow: 0 6px 18px rgba(155, 39, 175, 0.18);
}

.cat-tab-ico {
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(155, 39, 175, 0.3));
}

/* ─── CARDS BLOQUEADOS (cliente sem permissão) ─── */
.cat-locked {
  position: relative;
  filter: grayscale(0.85) brightness(0.65);
  opacity: 0.7;
  cursor: pointer !important;
  transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.cat-locked:hover {
  filter: grayscale(0.55) brightness(0.85);
  opacity: 0.92;
  transform: translateY(-2px);
}

.cat-locked::before {
  content: "💎 Upgrade";
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(155, 39, 175, 0.95), rgba(0, 196, 167, 0.85));
  color: #fff;
  font: 700 10.5px/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 100px;
  box-shadow: 0 4px 14px rgba(155, 39, 175, 0.4);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cat-locked:hover::before {
  opacity: 1;
  transform: translateY(0);
}

.cat-locked::after {
  content: "🔒";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(6, 4, 13, 0.5);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 4;
}

.cat-locked:hover::after {
  opacity: 0.85;
}

/* ─── TOAST DE UPGRADE ─── */
.cat-upgrade-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  opacity: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(20, 20, 35, 0.92);
  border: 1px solid rgba(155, 39, 175, 0.45);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(155, 39, 175, 0.25);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  z-index: 9999;
  max-width: 480px;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
  font-family: "Inter", sans-serif;
}

.cat-upgrade-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cat-upgrade-ico {
  font-size: 28px;
  flex-shrink: 0;
}

.cat-upgrade-body {
  flex: 1;
  min-width: 0;
}

.cat-upgrade-tt {
  font: 700 14px/1.2 "Space Grotesk", sans-serif;
  color: #fff;
  margin-bottom: 4px;
}

.cat-upgrade-st {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.cat-upgrade-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: linear-gradient(135deg, #25d366, #1ebe5c);
  color: #fff;
  font: 700 13px/1 "Inter", sans-serif;
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.cat-upgrade-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.5);
}

.cat-upgrade-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.cat-upgrade-close:hover { color: #fff; }

@media (max-width: 600px) {
  .cat-upgrade-toast {
    flex-wrap: wrap;
    bottom: 16px;
    left: 12px;
    right: 12px;
    transform: translateY(100px);
    max-width: none;
  }
  .cat-upgrade-toast.show { transform: translateY(0); }
  .cat-upgrade-cta { width: 100%; justify-content: center; }
  .cat-tabs-bar { padding: 6px; gap: 6px; }
  .cat-tab { padding: 8px 12px; font-size: 12px; }
}
