/* Left Sidebar */
.er-sidebar-left {
}

.er-sidebar-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.er-topic-list {
  list-style: none;
  padding: 0;
}

.er-topic-list li {
  margin-bottom: 5px;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 5px;
}

.er-topic-list li:last-child {
  border-bottom: none;
}

.er-topic-section {
  margin-bottom: 1.25rem;
}

.er-topic-section:last-child {
  margin-bottom: 0;
}

.er-topic-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--kdb-navy-color);
  margin-bottom: 0.5rem;
}

.er-topic-list a {
  text-decoration: none;
  color: #333;
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.er-topic-list a:hover {
  background-color: rgba(249, 109, 0, 0.08);
  color: var(--kdb-orange-color);
}

.er-topic-list li.active a {
  background-color: var(--kdb-navy-color);
  color: var(--text-color-white);
  font-weight: bold;
}

/* Desktop Topic List Scrollbar */
@media (min-width: 992px) {
  .er-topic-list {
    max-height: 320px; /* Fits approx 6 items before scrolling */
    overflow-y: auto !important;
    padding-right: 5px; /* Space for scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
  }

  /* Custom webkit scrollbar for Chrome/Safari */
  .er-topic-list::-webkit-scrollbar {
    width: 6px;
  }

  .er-topic-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .er-topic-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
  }

  .er-topic-list::-webkit-scrollbar-thumb:hover {
    background: #999;
  }
}

#passage-column p,
#passage-column ul li {
  font-size: 1.1rem;
  line-height: 1.6;
}

#question-column p,
#question-column label {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Ad placement specific styles */
.ktb-ad-wrapper {
  /* Core Web Vitals: Reserve space to prevent CLS */
  min-height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  background-color: #f9f9f9;
  border: 1px dashed #e0e0e0;
}

.ktb-ad-sidebar {
  position: sticky;
  top: 90px; /* Accommodates sticky header if present */
}

/* Responsive Ad Wrapper scaling for mobile devices */
@media (max-width: 991.98px) {
  .ktb-ad-wrapper {
    min-height: 100px !important;
    height: auto !important;
  }
}
