/* ==========================================================================
   OmniRSS 24px High-Density Article List Styling (Center Pane)
   ========================================================================== */

.list-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}

/* Quiet Mode Active Notice Banner */
.quiet-mode-banner {
  display: none;
  background: var(--accent-purple);
  color: #ffffff;
  font-size: var(--font-size-xs);
  padding: 3px 10px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-weight: 500;
}
.quiet-mode-banner.active {
  display: flex;
}

/* Active Scope / Filter Capsule Bar */
.active-filter-bar {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 3px 10px;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 11px;
}
.active-filter-bar.active {
  display: flex;
}
.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-primary-dim, rgba(59, 130, 246, 0.12));
  color: var(--accent-primary, #3b82f6);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 9999px;
  padding: 1px 8px;
  font-weight: 500;
}
.btn-clear-filter {
  background: none;
  border: none;
  color: var(--accent-primary, #3b82f6);
  cursor: pointer;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0.8;
  transition: opacity 0.1s, transform 0.1s;
}
.btn-clear-filter:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* 24px Table Header Bar */
.list-header-row {
  height: max(24px, calc(var(--list-font-size, 13px) + 11px));
  background: var(--bg-surface-hover);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  font-size: max(10px, calc(var(--list-font-size, 13px) - 1px));
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  user-select: none;
}

.col-cell {
  display: flex;
  align-items: center;
  padding: 0 6px;
  height: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-right: 1px solid var(--border-color-subtle);
}

.col-cell:last-child {
  border-right: none;
}

.col-header {
  position: relative;
  cursor: pointer;
  transition: color 0.1s;
}

.col-header:hover {
  color: var(--text-primary);
}

.col-header .sort-icon {
  margin-left: 4px;
  font-size: 10px;
  opacity: 0.7;
}

/* Column Drag Resizing Handle */
.col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 20;
  user-select: none;
  touch-action: none;
  transition: background-color 0.15s ease;
}
.col-resizer:hover,
.col-resizer.resizing {
  background-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

/* Clickable Feed Filter Link (Focus Feed) */
.feed-name-link {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}
.feed-name-link:hover {
  color: var(--accent-primary, #3b82f6);
  text-decoration: underline;
}

/* Column Standard Widths (Base Fallbacks, overridden dynamically by #omnirss-column-widths-style) */
.col-status { width: 28px; min-width: 20px; justify-content: center; padding: 0; }
.col-star { width: 28px; min-width: 20px; justify-content: center; padding: 0; }
.col-title { flex: 1 1 0px; min-width: 150px; }
.col-feed { width: 140px; min-width: 80px; }
.col-date { width: 120px; min-width: 70px; }
.col-author { width: 100px; min-width: 60px; }
.col-tags { width: 100px; min-width: 60px; }
.col-actions { width: 80px; min-width: 60px; justify-content: center; padding: 0 2px; }

/* Drag & Drop Column Reordering Indicators */
.col-header-drag {
  cursor: grab;
  position: relative;
  transition: background-color 0.1s ease, border-color 0.1s ease;
}
.col-header-drag:active {
  cursor: grabbing;
}
.col-header-drag.dragging {
  opacity: 0.4;
  background-color: var(--bg-surface-active);
}
.col-header-drag.drag-over-left::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 6px var(--accent-primary, #3b82f6);
  z-index: 10;
}
.col-header-drag.drag-over-right::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 6px var(--accent-primary, #3b82f6);
  z-index: 10;
}

/* Header & Row Action Capsules */
.header-actions-capsule,
.row-actions-capsule {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color-subtle);
  border-radius: 4px;
  padding: 1px 2px;
}

.btn-col-action,
.btn-row-action {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.btn-col-action:hover,
.btn-row-action:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-primary, #3b82f6);
}

.col-picker-trigger {
  width: 24px;
  min-width: 24px;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  background: var(--bg-surface);
}
.col-picker-trigger:hover {
  color: var(--text-primary);
  background: var(--bg-surface-active);
}

.col-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-title .title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-author-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted, #9ca3af);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 4px;
  padding: 0 5px;
  margin-left: 6px;
  flex-shrink: 0;
  line-height: 1.3;
  user-select: none;
}

.article-row.selected .inline-author-badge {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.95);
}

/* 24px Scrollable Rows Body */
.list-rows-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.article-row {
  height: max(24px, calc(var(--list-font-size, 13px) + 11px));
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color-subtle);
  font-size: var(--list-font-size, 13px);
  color: var(--text-muted);
  opacity: 0.65;
  cursor: pointer;
  transition: background-color 0.08s ease, opacity 0.08s ease;
}

.article-row:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  opacity: 1;
}

.article-row.selected {
  background-color: var(--bg-selected-row);
  color: #ffffff;
  opacity: 1;
}

.article-row.selected .text-muted,
.article-row.selected .feed-name {
  color: rgba(255, 255, 255, 0.8) !important;
}

.article-row.unread {
  font-weight: 600;
  color: var(--text-unread);
  opacity: 1;
}

/* Status & Star Indicators */
.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--unread-dot-color);
  display: inline-block;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--star-empty-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  transition: transform 0.1s ease, color 0.1s ease;
}

.star-btn:hover {
  transform: scale(1.15);
  color: var(--star-color);
}

.star-btn.starred {
  color: var(--star-color);
}

.star-btn.starred svg {
  fill: currentColor !important;
}

.tag-badge-sm {
  font-size: 10px;
  background: var(--bg-badge);
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid transparent;
  font-weight: 500;
}

.tag-badge-sm.clickable-tag {
  cursor: pointer;
  transition: all 0.12s ease;
}

.tag-badge-sm.clickable-tag:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* Skeleton Loading State Animation */
@keyframes pulse-shimmer {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

.skeleton-row {
  height: var(--row-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color-subtle);
  padding: 0 6px;
  gap: 8px;
}

.skeleton-block {
  height: 12px;
  background: var(--bg-surface-active);
  border-radius: 3px;
  animation: pulse-shimmer 1.5s infinite ease-in-out;
}

/* Rich 4-State Cards */
.state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  gap: 12px;
  padding: 32px 20px;
  text-align: center;
}

.state-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-active);
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.state-card-icon.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.state-card-icon.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.state-card-title {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
}

.state-card-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

.state-card-btn {
  margin-top: 8px;
  padding: 6px 14px;
  font-size: var(--font-size-sm);
  font-weight: 500;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  transition: opacity 0.15s;
}

.state-card-btn:hover {
  opacity: 0.9;
}

/* Right-click Article Context Menu */
.article-context-menu {
  position: fixed;
  z-index: 1000;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 4px 0;
  min-width: 190px;
  font-size: var(--font-size-sm, 12px);
  color: var(--text-primary);
  user-select: none;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.1s, color 0.1s;
}

.context-menu-item:hover {
  background: var(--bg-surface-hover);
  color: var(--accent-primary);
}

.context-menu-item.danger:hover {
  color: var(--accent-danger, #ef4444);
}

.context-menu-divider {
  height: 1px;
  background: var(--border-color-subtle);
  margin: 4px 0;
}
