/**
 * Blog article — additions on top of guides-article.css / guides-comments.css.
 * Only what Guides does not have: popular courses list and blog comment details.
 */

/* ─── Popular courses list (panel and heading are shared with the Guides rail in guides-article.css) ─── */
body.guides-reading-page .blog-popular-rail {
  max-height: none;
  font-family: var(--guides-read-font);
}

body.guides-reading-page .blog-popular-rail__list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  padding: 10px;
  list-style: none;
}

body.guides-reading-page .blog-popular-rail__item {
  margin: 0;
}

html[data-theme] body.guides-reading-page .blog-popular-rail__link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: var(--guides-rail-item-size);
  font-weight: 500;
  line-height: 1.65;
  /* Beats the dark theme "main a" rule in devminds-theme.css */
  color: var(--guides-read-text) !important;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

/* Marker */
body.guides-reading-page .blog-popular-rail__link::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--guides-rail-accent) 50%, transparent);
  transition: background 0.15s ease;
}

/* Chevron pointing forward in RTL, shown on hover */
body.guides-reading-page .blog-popular-rail__link::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-inline-start: auto;
  border-block-start: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  opacity: 0;
  transform: translateX(4px) rotate(-45deg);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

html[data-theme] body.guides-reading-page .blog-popular-rail__link:hover,
html[data-theme] body.guides-reading-page .blog-popular-rail__link:focus-visible {
  background: var(--guides-rail-link-hover);
  color: var(--guides-read-heading) !important;
}

html[data-theme] body.guides-reading-page .blog-popular-rail__link:focus-visible {
  outline: 2px solid var(--guides-rail-accent);
  outline-offset: -2px;
}

body.guides-reading-page .blog-popular-rail__link:hover::before,
body.guides-reading-page .blog-popular-rail__link:focus-visible::before {
  background: var(--guides-rail-accent);
}

body.guides-reading-page .blog-popular-rail__link:hover::after,
body.guides-reading-page .blog-popular-rail__link:focus-visible::after {
  opacity: 0.85;
  transform: translateX(0) rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme] body.guides-reading-page .blog-popular-rail__link,
  body.guides-reading-page .blog-popular-rail__link::before,
  body.guides-reading-page .blog-popular-rail__link::after {
    transition: none;
  }
}

/* Below the Guides rail breakpoint the list follows the article text. */
@media (max-width: 1099.98px) {
  body.guides-reading-page .pillar-article--blog-reading {
    display: flex;
    flex-direction: column;
  }

  body.guides-reading-page .pillar-article--blog-reading > .guides-article-layout__top {
    display: contents;
  }

  body.guides-reading-page .pillar-article--blog-reading .blog-popular-rail {
    order: 1;
    margin-top: 3rem;
  }
}

/* ─── Comments ─── */
body.guides-reading-page .blog-comments__likes {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: 1.3rem;
  color: var(--gt-muted);
}

body.guides-reading-page .blog-comments__signed-in {
  margin: 0 0 1.2rem;
  font-size: 1.4rem;
  color: var(--gt-muted);
}

body.guides-reading-page .blog-comments__signed-in a {
  font-weight: 600;
  color: var(--gt-emphasis);
}

body.guides-reading-page .blog-comments .js-comment-form.is-rate-limited .guides-comments__textarea {
  cursor: not-allowed;
  opacity: 0.7;
}

body.guides-reading-page .blog-comments .js-comment-form.is-rate-limited .guides-comments__submit {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}
