/* ============================================
   TRANG DANH SÁCH THỂ LOẠI — A-Z Directory
   ============================================ */

.theloai-page-section {
  padding: 2rem 0 4rem;
}

.theloai-page-header {
  margin-bottom: 2rem;
}

.theloai-page-title {
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
  font-weight: 700;
  color: var(--text-color, #333);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   ALPHABET NAVIGATION
   ============================================ */

.theloai-alphabet-nav {
  position: sticky;
  top: 70px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.75rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  -ms-border-radius: 10px;
  -o-border-radius: 10px;
}

.theloai-alphabet-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.theloai-alphabet-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color, #333);
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  background: transparent;
  transition: all 0.2s ease;
}

.theloai-alphabet-pill:hover:not(.disabled) {
  background: rgba(208, 76, 88, 0.15);
  border-color: rgba(208, 76, 88, 0.4);
  color: #d04c58;
  text-decoration: none;
}

.theloai-alphabet-pill.active {
  background: linear-gradient(180deg, #f09d9b -12.74%, #d04c58 100%);
  border-color: transparent;
  color: #fff;
}

.theloai-alphabet-pill.disabled {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
}

/* ============================================
   CATEGORY GROUPS
   ============================================ */

.theloai-group {
  margin-bottom: 2.5rem;
}

.theloai-group-heading {
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
  background: linear-gradient(180deg, #f09d9b -12.74%, #d04c58 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theloai-group-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin: 0 0 1rem;
}

/* ============================================
   ITEMS
   ============================================ */

.theloai-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.theloai-item:hover {
  background: rgba(208, 76, 88, 0.08);
  border-color: rgba(208, 76, 88, 0.2);
  transform: translateX(4px);
  text-decoration: none;
  color: inherit;
}

.theloai-item-name {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-color, #333);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.theloai-item-count {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 575.98px) {
  .theloai-page-section {
    padding: 1rem 0 2rem;
  }

  .theloai-alphabet-nav {
    top: 60px;
    padding: 0.5rem 0;
  }

  .theloai-alphabet-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }

  .theloai-alphabet-list::-webkit-scrollbar {
    display: none;
  }

  .theloai-alphabet-pill {
    min-width: 28px;
    height: 28px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .theloai-group {
    margin-bottom: 2rem;
  }

  .theloai-item {
    padding: 10px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .theloai-alphabet-pill,
  .theloai-item {
    transition: none;
  }
}
