/* elgar/css/components/node.css */

/* --- 1. Node Metadata (Author/Date) --- */
.submitted {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  font-style: italic;
}

.submitted .username {
  font-weight: 600;
  color: var(--color-link, #333366);
  text-decoration: none;
}

.submitted .username:hover {
  text-decoration: underline;
  color: var(--color-link-hover, #000);
}

.submitted time {
  white-space: nowrap;
}

/* Read Time Styling */
.node__meta .read-time {
  color: #c1a068;
  margin-left: 10px;
  white-space: nowrap;
}

/* --- 2. Node Internal Region (Floating Block) --- */
.node-internal-region-wrapper {
  background: #f9f9f9;
  border-left: 5px solid #0b5fb4;
  padding: 1rem;
  font-family: var(--font-heading); /* Uses your Mukta font */

  /* Floating Logic */
  float: right;
  width: 300px;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  clear: right;
}

/* Mobile Stack */
@media (max-width: 768px) {
  .node-internal-region-wrapper {
    float: none;
    width: 100%;
    margin-left: 0;
  }
}

/* --- 3. Book Pager (Prev / Start / Next) --- */
.book-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* Equal sides, auto center */
  gap: 1rem;
  align-items: center;
  
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
  font-family: var(--font-heading, sans-serif);
}

/* Alignment */
.book-pager__item--prev {
  text-align: left;
}

.book-pager__item--center {
  text-align: center;
  min-width: 100px;
}

.book-pager__item--next {
  text-align: right;
}

/* Link Styling */
.book-pager__link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-link, #333366);
  font-weight: 600;
  line-height: 1.3;
  transition: color 0.2s, transform 0.2s;
  gap: 0.5rem;
}

.book-pager__link:hover {
  color: var(--color-link-hover, #000);
  text-decoration: none;
  transform: translateY(-2px);
}

/* Specific styling for the center 'Start' link */
.book-pager__link--top {
  font-size: 1.1rem;
  color: #c1a068; /* Gold color for Start */
}

.book-pager__link--top:hover {
  color: #a08050;
}

/* Icons */
.book-pager__icon {
  font-size: 1.2rem;
  line-height: 1;
  color: #c1a068; /* Gold accent color */
}

.book-pager__title {
  /* Ensure title wraps properly if long */
  display: inline-block;
}

/* Mobile: Stack vertically if too narrow */
@media (max-width: 600px) {
  .book-pager {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .book-pager__item--prev,
  .book-pager__item--center,
  .book-pager__item--next {
    text-align: center;
  }
  
  .book-pager__link {
    justify-content: center;
  }
}

/* --- 4. Book TOC (Table of Contents) --- */
.book-toc {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.book-toc__title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-family: var(--font-heading, sans-serif);
  font-size: 1.5rem;
  color: #333;
  border-bottom: 2px solid #c1a068;
  display: inline-block;
  padding-bottom: 0.2rem;
}

.book-toc ul.menu {
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.book-toc ul.menu li {
  margin-bottom: 0.5rem;
  list-style-type: none; /* Remove default bullets */
  position: relative;
}

.book-toc ul.menu li::before {
  content: "•";
  color: #c1a068;
  position: absolute;
  left: -1rem;
  font-size: 1.2em;
  line-height: 1;
}

.book-toc ul.menu li a {
  text-decoration: none;
  color: var(--color-link, #333366);
  font-weight: 500;
  transition: color 0.2s;
}

.book-toc ul.menu li a:hover,
.book-toc ul.menu li a.is-active {
  color: var(--color-link-hover, #000);
  text-decoration: underline;
}

/* Nested lists */
.book-toc ul.menu ul.menu {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}