/* Teddy Rook Book Club - Books section polish (British Racing Green theme) */
#bookTable {
  background: #fff;
  color: #222;
  border: 1px solid #e5e5e5;
}

#bookTable th {
  background: #004C2A;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
  font-weight: 600;
}

#bookTable td {
  color: #222;
}

#bookTable tr {
  border-bottom: 1px solid #eee;
}

#bookTable tr:hover {
  background: #f8f8f5;
}

#bookTable a {
  color: #004C2A;
}

/* Dark mode for the table */
html[data-theme="dark"] #bookTable {
  background: #1c211f;
  color: #ddd;
  border-color: #3a403d;
}

html[data-theme="dark"] #bookTable th {
  background: #004C2A;
  color: #fff;
}

html[data-theme="dark"] #bookTable td {
  color: #ddd;
}

html[data-theme="dark"] #bookTable tr {
  border-bottom-color: #3a403d;
}

html[data-theme="dark"] #bookTable tr:hover {
  background: #252b28;
}

html[data-theme="dark"] #bookTable a {
  color: #a8d5b8 !important;
}

/* Other existing styles */
.books-page table {
  font-feature-settings: "tnum";
}
.books-page th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.books-page input[type="search"],
.books-page select {
  transition: border-color .1s ease;
}
.books-page input[type="search"]:focus,
.books-page select:focus {
  border-color: #004C2A;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 76, 42, 0.15);
}
.book-single h1 {
  color: #002b18;
}
.book-single .book-content h2 {
  border-bottom: 1px solid #eee;
  padding-bottom: 0.25rem;
  margin-top: 1.75rem;
}
.book-single blockquote {
  border-left: 4px solid #004C2A;
  margin-left: 0;
  padding-left: 1rem;
  color: #333;
  font-style: italic;
}

/* Dark mode overrides (respects PaperMod's html[data-theme="dark"]) */
html[data-theme="dark"] .trbc-dashboard {
  color: #e0e0e0;
}

html[data-theme="dark"] .trbc-dashboard h1,
html[data-theme="dark"] .trbc-dashboard h2 {
  color: #a8d5b8;
}

html[data-theme="dark"] #bookTable {
  background: #1f2421;
  color: #ddd;
}

html[data-theme="dark"] #bookTable th {
  background: #004C2A;
  color: #fff;
}

html[data-theme="dark"] #bookTable tr {
  border-bottom-color: #3a3f3c;
}

html[data-theme="dark"] #bookTable tr:hover {
  background: #2a2f2c;
}

html[data-theme="dark"] .trbc-dashboard input[type="search"],
html[data-theme="dark"] .trbc-dashboard select {
  background: #2a2f2c;
  color: #eee;
  border-color: #4a524d;
}

html[data-theme="dark"] .trbc-dashboard .books-controls {
  background: #2a2f2c;
  border-color: #3a3f3c;
}

html[data-theme="dark"] .trbc-dashboard [style*="background: #f8f9fa"],
html[data-theme="dark"] .trbc-dashboard [style*="background: #fafafa"],
html[data-theme="dark"] .trbc-dashboard [style*="background:#f8f9f7"],
html[data-theme="dark"] .trbc-dashboard .books-controls,
html[data-theme="dark"] .trbc-dashboard #book-stats > div {
  background: #2a2f2c !important;
  border-color: #3a3f3c !important;
  color: #ddd !important;
}

/* Stronger fix for the "What's New" / notifications card and similar top cards */
html[data-theme="dark"] .trbc-dashboard section > div[style*="background: #f8f9f7"],
html[data-theme="dark"] .trbc-dashboard > div[style*="background: #f8f9f7"] {
  background: #2a2f2c !important;
  border-color: #3a3f3c !important;
  color: #ddd !important;
}

html[data-theme="dark"] .trbc-dashboard section > div[style*="background: #f8f9f7"] li,
html[data-theme="dark"] .trbc-dashboard > div[style*="background: #f8f9f7"] {
  color: #ccc !important;
}

/* What's New h2 in dark mode - avoid dark green on dark bg */
html[data-theme="dark"] .trbc-dashboard h2[style*="color: #004C2A"] {
  color: #a8d5b8 !important;
}

html[data-theme="dark"] .trbc-dashboard [style*="color: #555"],
html[data-theme="dark"] .trbc-dashboard [style*="color: #333"],
html[data-theme="dark"] .trbc-dashboard [style*="color:#444"] {
  color: #bbb !important;
}

/* Book single page dark mode */
html[data-theme="dark"] .book-single {
  color: #ddd;
}

html[data-theme="dark"] .book-single blockquote {
  color: #ccc;
  border-left-color: #a8d5b8;
}