@layer components {
/*
 * components/category-tabs.css
 *
 * Chips de categoria horizontais com cores por categoria.
 * Carregado em todas as páginas via base.html.
 */

/* ----- Seção container ----- */

.category-tabs-section {
  width: 100%;
  max-width: 1400px;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-tabs-floating {
  margin: 0 auto 4px;
  width: 100%;
  max-width: 1400px;
  align-self: center;
  justify-content: center;
}

/* ----- Scroll wrapper ----- */

.category-tabs-wrapper {
  display: flex;
  gap: 8px;
  overflow: auto hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
  max-width: 100%;
}

.category-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

/* ----- Chip base ----- */

.category-tab {
  flex-shrink: 0;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 4px rgb(0 0 0 / 25%);
}

/* Overlay de hover — mantido mas simplificado */
.category-tab-overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 18%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.category-tab-label {
  position: relative;
  z-index: 1;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgb(0 0 0 / 35%);
}

/* Emojis via ::before — mantidos nos chips com cor */
.category-tab .category-tab-label::before {
  margin-inline-end: 2px;
}

/* ----- Estados ----- */

.category-tab:hover .category-tab-overlay {
  opacity: 1;
}

.category-tab:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgb(0 0 0 / 30%);
}

.category-tab.active {
  filter: brightness(1.12);
  transform: none;
  box-shadow: 0 2px 10px rgb(0 0 0 / 40%);
  outline: 2px solid rgb(255 255 255 / 50%);
  outline-offset: -2px;
}

/* Remove active underline do design anterior */
.category-tab::before {
  display: none;
}

.category-tab.active::after {
  display: none;
}

/* ========================================================================================
   BACKGROUNDS POR CATEGORIA
   ======================================================================================== */

.category-tab-all {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-tab-all .category-tab-label::before {
  content: '🌟';
}

.category-tab-anime-manga {
  background: linear-gradient(135deg, #ff6b6b 0%, #c44569 100%);
}

.category-tab-anime-manga .category-tab-label::before {
  content: '🎌';
}

.category-tab-asmr {
  background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
}

.category-tab-asmr .category-tab-label::before {
  content: '🎧';
}

.category-tab-video-games {
  background: linear-gradient(135deg, #00b4d8 0%, #4361ee 100%);
}

.category-tab-video-games .category-tab-label::before {
  content: '🎮';
}

.category-tab-super-herois-comics {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.category-tab-super-herois-comics .category-tab-label::before {
  content: '🦸';
}

.category-tab-filmes-cinema {
  background: linear-gradient(135deg, #f9a825 0%, #e65100 100%);
}

.category-tab-filmes-cinema .category-tab-label::before {
  content: '🎬';
}

.category-tab-series-tv {
  background: linear-gradient(135deg, #56cfe1 0%, #48bfe3 50%, #6930c3 100%);
}

.category-tab-series-tv .category-tab-label::before {
  content: '📺';
}

.category-tab-sci-fi {
  background: linear-gradient(135deg, #2e3192 0%, #00c6ff 100%);
}

.category-tab-sci-fi .category-tab-label::before {
  content: '🚀';
}

.category-tab-fantasia {
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
}

.category-tab-fantasia .category-tab-label::before {
  content: '🧙';
}

.category-tab-horror {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.category-tab-horror .category-tab-label::before {
  content: '👻';
}

.category-tab-steampunk-cyberpunk {
  background: linear-gradient(135deg, #d4380d 0%, #d48806 100%);
}

.category-tab-steampunk-cyberpunk .category-tab-label::before {
  content: '⚙️';
}

.category-tab-historico {
  background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
}

.category-tab-historico .category-tab-label::before {
  content: '🏛️';
}

.category-tab-original {
  background: linear-gradient(135deg, #be185d 0%, #ea580c 100%);
}

.category-tab-original .category-tab-label::before {
  content: '🎭';
}

.category-tab-outros {
  background: linear-gradient(135deg, #065f46 0%, #0284c7 100%);
}

.category-tab-outros .category-tab-label::before {
  content: '✨';
}

/* ----- Botões de scroll ----- */

.category-scroll-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 12%);
  color: rgb(255 255 255 / 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.category-scroll-btn:hover {
  background: rgb(255 255 255 / 16%);
  color: #fff;
}

.category-scroll-btn svg {
  width: 14px;
  height: 14px;
}

/* ----- Mobile ----- */

@media (width <= 768px) {
  .category-tab {
    height: 28px;
    padding: 0 10px;
    font-size: 0.75rem;
  }

  .category-tabs-wrapper {
    gap: 6px;
  }
}

/* ----- Light mode ----- */

.light-mode .category-tab {
  box-shadow: 0 1px 4px rgb(0 0 0 / 20%);
}

.light-mode .category-tab-label {
  text-shadow: 0 1px 2px rgb(0 0 0 / 30%);
}

} /* @layer components */
