/* ── Extended Lucide Icon Styles ────────────────────────────── */

/* Base icon styles */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke: currentColor;
  fill: none;
  vertical-align: middle;
}

/* Icon size variants */
.icon-xs { width: 0.75rem; height: 0.75rem; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }

/* ── Magazine UI Component Icons ─────────────────────────────── */

/* Article metadata icons */
.meta-icon,
.byline-icon {
  width: 0.875rem;
  height: 0.875rem;
  margin-right: 0.5rem;
  color: var(--imd-ink-soft, #666);
}

.meta-icon.featured {
  color: var(--imd-accent, #a0201b);
}

/* Toolbar icons */
.toolbar-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.25rem;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--imd-rule, #e5e5e5);
  background: var(--imd-paper, #ffffff);
  color: var(--imd-ink, #1a1a1a);
  font-size: 0.875rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-btn:hover {
  background: var(--imd-ink-soft, #f8f8f8);
  border-color: var(--imd-ink-soft, #d1d1d1);
}

.toolbar-btn.active {
  background: var(--imd-accent, #a0201b);
  border-color: var(--imd-accent, #a0201b);
  color: var(--imd-paper, #ffffff);
}

/* Navigation icons */
.nav-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: transparent;
  color: var(--imd-ink, #1a1a1a);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background: var(--imd-rule, #f0f0f0);
}

/* Section and content icons */
.section-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.375rem;
  color: var(--imd-accent, #a0201b);
}

.page-icon {
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.25rem;
  color: var(--imd-ink-soft, #666);
}

/* ── Table of Contents Icons ─────────────────────────────────── */

.toc-entry {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

.toc-entry:hover {
  background: var(--imd-rule, #f8f8f8);
}

.toc-entry.featured {
  border-left: 3px solid var(--imd-accent, #a0201b);
}

.toc-entry.read {
  opacity: 0.6;
}

.entry-icon-wrapper {
  position: relative;
  flex-shrink: 0;
}

.entry-icon-wrapper .icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--imd-ink-soft, #666);
}

.overlay-icon {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 0.75rem;
  height: 0.75rem;
  color: var(--imd-accent, #a0201b);
}

.read-icon {
  width: 1rem;
  height: 1rem;
  color: var(--imd-accent, #a0201b);
}

/* ── Badge Icons ─────────────────────────────────────────────── */

.article-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.badge-editorial {
  background: var(--imd-rule, #f0f0f0);
  color: var(--imd-ink, #1a1a1a);
}

.badge-cover {
  background: var(--imd-accent, #a0201b);
  color: var(--imd-paper, #ffffff);
}

.badge-reportage {
  background: #1e40af;
  color: #ffffff;
}

.badge-interview {
  background: #059669;
  color: #ffffff;
}

.badge-opinion {
  background: #7c2d12;
  color: #ffffff;
}

.badge-culture {
  background: #7c3aed;
  color: #ffffff;
}

/* ── Progress and Info Panel Icons ──────────────────────────── */

.progress-icon,
.panel-icon,
.info-icon {
  width: 1rem;
  height: 1rem;
  color: var(--imd-accent, #a0201b);
}

.stat-icon {
  width: 0.875rem;
  height: 0.875rem;
  margin-right: 0.375rem;
  color: var(--imd-ink-soft, #666);
}

/* ── Settings Panel Icons ────────────────────────────────────── */

.settings-icon {
  width: 1.125rem;
  height: 1.125rem;
  margin-right: 0.5rem;
  color: var(--imd-accent, #a0201b);
}

.setting-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.375rem;
  color: var(--imd-ink-soft, #666);
}

.size-icon,
.theme-icon,
.layout-icon {
  width: 0.875rem;
  height: 0.875rem;
}

.size-btn,
.theme-btn,
.layout-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--imd-rule, #e5e5e5);
  background: var(--imd-paper, #ffffff);
  color: var(--imd-ink, #1a1a1a);
  font-size: 0.875rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.size-btn:hover,
.theme-btn:hover,
.layout-btn:hover {
  border-color: var(--imd-accent, #a0201b);
}

.theme-btn.active,
.layout-btn.active {
  background: var(--imd-accent, #a0201b);
  border-color: var(--imd-accent, #a0201b);
  color: var(--imd-paper, #ffffff);
}

/* ── Interactive States ──────────────────────────────────────── */

/* Icon button hover states */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: none;
  background: transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--imd-rule, #f0f0f0);
}

.icon-btn:active {
  background: var(--imd-ink-soft, #e0e0e0);
}

/* Loading and disabled states */
.icon.loading {
  animation: icon-spin 1s linear infinite;
}

.icon.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@keyframes icon-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Responsive Icon Adjustments ─────────────────────────────── */

@media (max-width: 768px) {
  .meta-icon,
  .toolbar-icon,
  .nav-icon {
    width: 0.875rem;
    height: 0.875rem;
  }
  
  .toolbar-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
  }
  
  .nav-btn {
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* ── Dark Mode Support ───────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root {
    --icon-color: #e5e5e5;
    --icon-color-muted: #a3a3a3;
    --icon-bg-hover: #2a2a2a;
  }
  
  .icon {
    color: var(--icon-color);
  }
  
  .meta-icon,
  .stat-icon,
  .setting-icon {
    color: var(--icon-color-muted);
  }
  
  .icon-btn:hover {
    background: var(--icon-bg-hover);
  }
}