/* Sidebar */
.sidebar {
  scrollbar-width: thin;
  scrollbar-color: #444 #1a1a1a;
}

/* Article cards */
.article-card {
  transition: border-color 0.15s;
}
.article-card.unread {
  border-left: 3px solid #ffc107 !important;
}
.article-card:hover {
  border-color: #6c757d !important;
}

.article-title {
  color: #e0e0e0;
}
.article-card.unread .article-title {
  color: #ffffff;
}
.article-card:not(.unread) .article-title {
  color: #8a9ba8;
}

.article-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feed-badge {
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Badge comuni */
.comune-badge {
  font-size: 0.7rem;
  background-color: #1a472a;
  color: #a3d9a5;
  border: 1px solid #2d6a4f;
  transition: background-color 0.15s;
}
.comune-badge:hover {
  background-color: #2d6a4f;
  color: #d8f3dc;
}
.comune-badge.badge-active {
  background-color: #2d6a4f;
  color: #d8f3dc;
}
.badge-inactive {
  background-color: #343a40;
  color: #adb5bd;
}
.badge-active {
  background-color: #495057;
  color: #ffffff;
}

/* Tabella pivot */
.pivot-table {
  font-size: 0.78rem;
  border-color: #2d3238 !important;
}
.pivot-table th {
  background: #1a1d20;      /* dark mode */
  white-space: nowrap;
  font-weight: 500;
  vertical-align: middle;
  border-color: #2d3238 !important;
}
[data-bs-theme="light"] .pivot-table th {
  background: #f1f3f5 !important;
  color: #212529;
}
.pivot-table th .comune-badge {
  font-size: 0.7rem;
}
.pivot-day-col {
  min-width: 80px;
  white-space: nowrap;
}
.pivot-cell {
  min-width: 36px;
  border-color: #2d3238 !important;
}
.pivot-active {
  background-color: rgba(45, 106, 79, 0.25);
}
.pivot-active a {
  color: #a3d9a5;
}

/* Separatore data */
.date-separator {
  display: flex;
  align-items: center;
  margin: 1rem 0 0.5rem;
  gap: 0.75rem;
  color: #adb5bd;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.date-separator::before,
.date-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #343a40;
}

/* Overflow fix */
.min-w-0 { min-width: 0; }
.overflow-y-auto { overflow-y: auto; }

/* ── Tema chiaro ── */
[data-bs-theme="light"] .article-title,
[data-bs-theme="light"] .article-card.unread .article-title,
[data-bs-theme="light"] a.article-title,
[data-bs-theme="light"] a.article-title:visited { color: #212529 !important; }
[data-bs-theme="light"] .article-card:not(.unread) .article-title { color: #495057 !important; }
[data-bs-theme="light"] .article-card:hover { border-color: #adb5bd !important; }

[data-bs-theme="light"] .comune-badge {
  background-color: #d8f3dc;
  color: #1a472a;
  border-color: #a3d9a5;
}
[data-bs-theme="light"] .comune-badge:hover,
[data-bs-theme="light"] .comune-badge.badge-active {
  background-color: #a3d9a5;
  color: #1a472a;
}
[data-bs-theme="light"] .badge-inactive { background-color: #e9ecef; color: #495057; }
[data-bs-theme="light"] .badge-active   { background-color: #dee2e6; color: #212529; }

[data-bs-theme="light"] .pivot-table       { border-color: #dee2e6 !important; }
[data-bs-theme="light"] .pivot-table th    { background: #f8f9fa; border-color: #dee2e6 !important; }
[data-bs-theme="light"] .pivot-cell        { border-color: #dee2e6 !important; }
[data-bs-theme="light"] .pivot-active      { background-color: rgba(163,217,165,0.35); }
[data-bs-theme="light"] .pivot-active a    { color: #1a472a; }

/* Tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; align-items: baseline; }
.tag-cloud a { text-decoration: none; color: #bbb; transition: color 0.15s; line-height: 1.4; }
.tag-cloud a:hover { color: #e6a817; }
.tc-1 { font-size: 0.78rem !important; opacity: 0.55; }
.tc-2 { font-size: 1.05rem !important; opacity: 0.68; }
.tc-3 { font-size: 1.38rem !important; opacity: 0.82; }
.tc-4 { font-size: 1.72rem !important; opacity: 0.93; }
.tc-5 { font-size: 2.1rem  !important; opacity: 1; font-weight: 600; }

[data-bs-theme="light"] .tag-cloud a { color: #444; }
[data-bs-theme="light"] .tag-cloud a:hover { color: #c8860a; }

[data-bs-theme="light"] .date-separator { color: #6c757d; }
[data-bs-theme="light"] .date-separator::before,
[data-bs-theme="light"] .date-separator::after { background: #dee2e6; }

[data-bs-theme="light"] .sidebar { scrollbar-color: #adb5bd #f1f3f5; }
