/* ==========================================================================
   News Section
   ========================================================================== */

.news-container {
  margin: 0.8em 0;
}

.news-filter {
  margin-bottom: 0.6em;
}

.news-filter input {
  width: 100%;
  max-width: 260px;
  padding: 6px 12px;
  font-size: 0.82em;
  font-family: "Crimson Pro", Georgia, serif;
  color: var(--text-color);
  background: var(--bg-content);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.news-filter input::placeholder {
  color: var(--text-muted);
}

.news-filter input:focus {
  border-color: var(--heading-color);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.news-list {
  max-height: 420px;
  overflow-y: scroll;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-content);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Always show scrollbar */
.news-list::-webkit-scrollbar {
  width: 8px;
}

.news-list::-webkit-scrollbar-track {
  background: var(--bg-page);
  border-radius: 0 14px 14px 0;
}

.news-list::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
  border: 2px solid var(--bg-content);
}

.news-list::-webkit-scrollbar-thumb:hover {
  background: var(--divider-color);
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s ease;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background-color: rgba(190, 168, 122, 0.06);
}

.news-item.hidden {
  display: none;
}

.news-date-block {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 4px 6px;
  background: #e0c49c;
  border-radius: 6px;
  color: #fff;
  line-height: 1.2;
  font-size: 0.65em;
  font-weight: 400;
  font-family: "IBM Plex Mono", monospace;
}

.news-content {
  font-size: 1em;
  line-height: 1.55;
  color: var(--text-color);
  padding-top: 2px;
}

.news-content a {
  color: var(--link-color);
  text-decoration: none;
}

.news-content a:hover {
  text-decoration: underline;
}

/* Dark theme */
[data-theme="dark"] .news-list {
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .news-date-block {
  background: #d4b07c;
  color: #1a1a1a;
}

[data-theme="dark"] .news-item:hover {
  background-color: rgba(176, 141, 87, 0.08);
}
