/* Badge Components */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-caption);
  font-weight: var(--weight-semibold);
  line-height: 1;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Standard Badge Colors */

.badge-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.badge-primary:hover {
  background-color: var(--color-primary-hover);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-primary:hover {
    background-color: color-mix(in srgb, var(--color-primary) 90%, black);
  }
}

.badge-secondary {
  background-color: var(--gray-500);
  color: var(--color-text-inverse);
}

.badge-secondary:hover {
  background-color: var(--gray-600);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-secondary:hover {
    background-color: color-mix(in srgb, var(--gray-500) 90%, black);
  }
}

.badge-success {
  background-color: var(--color-success);
  color: var(--color-text-inverse);
}

.badge-success:hover {
  background-color: var(--green-700);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-success:hover {
    background-color: color-mix(in srgb, var(--color-success) 90%, black);
  }
}

.badge-danger {
  background-color: var(--color-danger);
  color: var(--color-text-inverse);
}

.badge-danger:hover {
  background-color: var(--red-700);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-danger:hover {
    background-color: color-mix(in srgb, var(--color-danger) 90%, black);
  }
}

.badge-warning {
  background-color: var(--color-warning);
  color: var(--color-text-inverse);
}

.badge-warning:hover {
  background-color: var(--orange-700);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-warning:hover {
    background-color: color-mix(in srgb, var(--color-warning) 90%, black);
  }
}

.badge-info {
  background-color: var(--color-info);
  color: var(--color-text-inverse);
}

.badge-info:hover {
  background-color: var(--blue-700);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-info:hover {
    background-color: color-mix(in srgb, var(--color-info) 90%, black);
  }
}

.badge-light {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.badge-light:hover {
  background-color: var(--color-bg-active);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-light:hover {
    background-color: color-mix(in srgb, var(--color-bg-tertiary) 90%, black);
  }
}

.badge-dark {
  background-color: var(--gray-800);
  color: var(--color-text-inverse);
}

.badge-dark:hover {
  background-color: var(--gray-900);
}

@supports (color: color-mix(in srgb, white, black)) {
  .badge-dark:hover {
    background-color: color-mix(in srgb, var(--gray-800) 90%, white);
  }
}

/* Badge modifiers (BEM) */
.badge--outline {
  background: transparent;
  border: 1px solid currentColor;
}

.badge--sm {
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
}

.badge--xs {
  padding: 0.0625rem 0.375rem;
  font-size: 0.625rem;
}

.badge--success {
  background-color: var(--color-success);
  color: var(--color-text-inverse);
}

.badge--danger-subtle {
  background-color: var(--color-error-bg);
  color: var(--color-error-text);
  border: 1px solid var(--color-error-border);
}

/* Custom Badge Styles (Bengal-specific) */

.badge-featured {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  color: var(--color-text-inverse);
}

.badge-new {
  background: linear-gradient(135deg, var(--color-info) 0%, var(--color-primary) 100%);
  color: var(--color-text-inverse);
}

/* Dark Mode */
/* Removed redundant overrides - handled by semantic tokens */

/* Article Card Badges */
.article-card-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

/* Featured Card Styling */
.featured-card {
  border: 2px solid var(--color-primary);
  background: linear-gradient(
    to bottom right,
    var(--color-bg-primary),
    var(--color-bg-secondary)
  );
}

.featured-card:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

@supports (color: color-mix(in srgb, white, black)) {
  .featured-card:hover {
    border-color: color-mix(in srgb, var(--color-primary) 90%, black);
  }
}

/* Page Kind Body Classes */
body.page-kind-home .hero {
  display: block;
}

body.page-kind-section .section-navigation {
  margin-bottom: var(--space-8);
}

body.draft-page::before {
  content: "DRAFT";
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: var(--color-danger);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: var(--weight-bold);
  z-index: var(--z-dropdown);
}

/* Hidden/unlisted page indicator - shows in dev server */
body.hidden-page::before {
  content: "👁️ HIDDEN";
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-warning, #f59e0b);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: var(--weight-bold);
  font-size: 0.75rem;
  z-index: var(--z-dropdown);
  box-shadow: var(--shadow-md);
}

/* When both hidden and draft, show hidden (more specific) */
body.hidden-page.draft-page::before {
  content: "👁️ HIDDEN DRAFT";
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}
