

.media-categories-shell {
  position: relative;
  margin: 0 0 32px;
  isolation: isolate;
}

.media-categories-shell__glow {
  position: absolute;
  inset: -20% -4%;
  background:
    radial-gradient(ellipse 55% 70% at 12% 50%, rgba(175, 26, 21, 0.1), transparent 58%),
    radial-gradient(ellipse 45% 60% at 88% 40%, rgba(42, 42, 42, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.media-categories-shell__inner {
  position: relative;
  z-index: 1;
  padding: 18px 20px 20px;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.94) 100%);
  box-shadow:
    0 18px 48px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
}

.media-categories-shell__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.media-categories-shell__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.2rem;
  background: linear-gradient(145deg, rgba(175, 26, 21, 0.1), rgba(175, 26, 21, 0.04));
  border: 1px solid rgba(175, 26, 21, 0.12);
}

.media-categories-shell__eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #af1a15;
  text-transform: uppercase;
}

.media-categories-shell__head strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text, #111);
}

.media-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.media-categories__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(255, 255, 255, 0.88);
  color: var(--text, #1a1a1a);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.media-categories__pill:hover {
  transform: translateY(-2px);
  border-color: rgba(175, 26, 21, 0.28);
  background: #fff;
  box-shadow:
    0 10px 24px rgba(175, 26, 21, 0.1),
    0 2px 8px rgba(15, 23, 42, 0.05);
}

.media-categories__pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(175, 26, 21, 0.35);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.media-categories__pill-icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.9;
}

.media-categories__pill-label {
  line-height: 1.2;
}

.media-categories__pill.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #af1a15 0%, #c62822 48%, #d43832 100%);
  box-shadow:
    0 12px 28px rgba(175, 26, 21, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transform: translateY(-1px);
}

.media-categories__pill.is-active:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #9a1612 0%, #b8221d 48%, #c92f29 100%);
  box-shadow:
    0 14px 32px rgba(175, 26, 21, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}

.media-categories__pill.is-active .media-categories__pill-dot {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.media-categories__count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  transition: background 0.25s ease;
}

.media-categories__pill.is-active .media-categories__count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.land-panel .media-categories-shell {
  margin-bottom: 18px;
}

.land-panel .media-categories-shell__inner {
  padding: 14px 16px 16px;
  border-radius: 20px;
  border-color: rgba(196, 160, 106, 0.35);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(61, 41, 20, 0.08);
}

.land-panel .media-categories-shell__head strong {
  color: #2a1f0f;
}

.land-panel .media-categories-shell__head {
  border-bottom-color: rgba(196, 160, 106, 0.22);
}

.land-panel .media-categories__pill {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(196, 160, 106, 0.32);
  color: #2a1f0f;
}

.land-panel .media-categories__pill:hover {
  border-color: rgba(175, 26, 21, 0.3);
}

.land-panel .media-categories__pill.is-active {
  background: linear-gradient(135deg, #af1a15 0%, #c62822 48%, #d43832 100%);
  color: #fff;
}

html[data-theme="dark"] .media-categories-shell__inner {
  background: linear-gradient(145deg, rgba(24, 32, 44, 0.96) 0%, rgba(18, 24, 34, 0.94) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .media-categories-shell__head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .media-categories-shell__head strong {
  color: #f2f4f8;
}

html[data-theme="dark"] .media-categories__pill {
  background: rgba(30, 38, 52, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f2f4f8;
}

html[data-theme="dark"] .media-categories__pill:hover {
  border-color: rgba(212, 56, 50, 0.45);
  background: rgba(36, 44, 58, 0.98);
}

html[data-theme="dark"] .media-categories__count {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .media-categories-shell__inner {
    padding: 14px 14px 16px;
    border-radius: 20px;
  }

  .media-categories {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .media-categories::-webkit-scrollbar {
    display: none;
  }

  .media-categories__pill {
    flex: 0 0 auto;
  }
}
