/* ==========================================================================
   Spotlight Series (single-spotlight.php)
   Uses semantic tokens only — no hardcoded brand values.
   ========================================================================== */

.spotlight-single {
  /* font-size: 1.2rem; */
  font-size: 1rem;
  color: var(--color-text-strong);
  background: var(--color-bg-tint);

  h1,
  h2,
  h3,
  h4 {
    font-family: var(--font-heading);
    font-weight: 700;
  }

  h1 {
    font-size: 2.5rem;
  }

  p {
    font-family: var(--font-body);
  }
}

/* Header */
.spotlight-header {
  background: radial-gradient(
    at center top,
    var(--color-text-inverse) -50%,
    color-mix(in srgb, var(--color-surface-dark) 70%, var(--color-highlight)) 33%,
    var(--color-surface-dark-deep) 90%
  );
  color: var(--color-text-inverse);
  position: relative;
  width: 100%;
  overflow: hidden;

  .spotlight-logo {
    width: 400px;
    max-width: 100%;
    height: auto;
  }

  .spotlight-info {
    @media (max-width: 991px) {
      text-align: center;
    }
  }

  .spotlight-intro {
    text-wrap: balance;
  }

  .bg {
    display: block;
    position: absolute;
    width: 100%;
    height: 25%;
    background: radial-gradient(at center top, var(--color-text-inverse) -1%, transparent 50%);
    background-size: 53% 70%;
    background-repeat: no-repeat;
    background-position: center top;
    opacity: 0.25;
  }
}

.spotlight-label {
  padding: 0.125em 0.5em;
  background-color: var(--color-highlight-warm);
  color: var(--color-text-inverse);
  font-family: var(--font-heading);
  display: inline-block;
  font-weight: 600;
  font-size: smaller;
}

/* Table of contents */
.sticky-md-top.spotlight-toc-wrap {
  @media (min-width: 768px) {
    width: 300px;
    top: 6em;
  }
}

.spotlight-toc {
  padding: 0;
  background: var(--color-text-inverse);
  font-family: var(--font-body);
  min-width: 200px;
  border-radius: 5px;

  h3 {
    margin: 0;
    padding: 0.6em 1em;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--color-surface-dark);
    color: var(--color-text-inverse);
  }

  ol {
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    counter-reset: toc-counter;
  }

  li {
    font-size: 0.9em;
    line-height: 1.3;
    padding: 0.5em 0.5em 0.5em 2em;
    border-bottom: 1px dashed var(--color-border);
    position: relative;
    counter-increment: toc-counter;

    &::before {
      content: counter(toc-counter) " ";
      position: absolute;
      left: 0;
      top: 0.5em;
      color: var(--color-highlight-warm);
      font-weight: 600;
      min-width: 1.2em;
      padding-left: 0.5em;
    }

    &:last-of-type {
      border-bottom: unset;
    }

    a {
      text-decoration: none;
      color: var(--color-text-strong);
      font-weight: 500;
      line-height: 1;

      &:hover,
      &:focus {
        color: var(--color-text-strong);
        text-decoration: none;
      }
    }

    &:hover,
    &:focus {
      background-color: var(--color-bg-tint);
    }
  }
}

.spotlight-toc-video-badge {
  display: inline-block;
  vertical-align: middle;
  background: var(--color-highlight-warm);
  color: var(--color-text-inverse);
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15em 0.4em;
  font-family: var(--font-heading);
  line-height: 1.4;
  white-space: nowrap;
  margin-left: 0.4em;
}

/* Article cards */
.spotlight-article {
  /* Override the global `article { width: 100% }` so these cards can sit beside the floated 300x250 */
  width: auto;
  border: var(--border-default);
  padding: 0;
  background-color: var(--color-text-inverse);
  border-radius: 5px;
  margin-bottom: 1em;
  overflow: hidden;
  font-size: 0.9rem;
}

/* Single-post mode: full article content shown inline instead of a list */
.spotlight-single-post {
  max-width: 50rem;
}

.spotlight-article-full {
  font-size: 1rem;
}

.spotlight-single .spotlight-article-full .spotlight-article-title {
  font-size: 2rem;
}

.spotlight-article-image-wrap {
  width: 140px;
  max-width: 100%;
  position: relative;

  img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    background-color: var(--color-text-base);
    object-fit: cover;
    object-position: center top;
  }

  &.has-video::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.4em;
    height: 2.4em;
    background: var(--color-highlight-warm);
    border-radius: 50%;
    color: var(--color-text-inverse);
    font-size: 1.3em;
    line-height: 2.4em;
    text-align: center;
    padding-left: 0.12em;
    pointer-events: none;
  }
}

.spotlight-article-category {
  font-family: var(--font-heading);
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-surface-dark);
  margin-bottom: 0.35em;

  &.is-video {
    color: var(--color-highlight-warm);
  }
}

.spotlight-article-title {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-size: 1.35em;
  font-family: var(--font-heading);
}

.spotlight-article-excerpt {
  font-family: var(--font-body);
}

.spotlight-expand-btn.btn.btn-secondary.btn-sm {
  line-height: 1;
  background-color: var(--color-surface-dark);
  border: unset;
  padding: 0.5em 0.85em;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--color-text-inverse) !important;
  border-radius: 5px;

  &.is-video {
    background-color: var(--color-highlight-warm);
  }
}

/* Modal */
.spotlight-article-modal {
  .modal-body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;

    p,
    ol,
    ul {
      margin-bottom: 1.25em;
    }
  }

  .modal-header {
    background-color: var(--color-text-inverse);
    border-bottom: var(--border-default);
  }

  .modal-content {
    height: 80vh;
    top: 10vh;

    iframe {
      width: 100%;
      height: auto;
      aspect-ratio: 16 / 9;
    }
  }

  .video-js {
    width: 100%;
    display: block;
    margin-bottom: 1.5em;

    .vjs-big-play-button {
      border: none;
      background-color: transparent;
      font-size: 4rem;

      .vjs-icon-placeholder::before {
        color: var(--color-highlight-warm);
        font-size: 2em;
      }
    }

    &:hover .vjs-big-play-button,
    .vjs-big-play-button:focus {
      border-color: unset;
      background-color: unset;
    }

    &:hover .vjs-big-play-button .vjs-icon-placeholder::before {
      color: var(--color-action);
    }
  }
}

/* Ad breaks — top leaderboard and in-list leaderboards */
.spotlight-ad-break {
  text-align: center;
  padding: 20px 0;
  border-bottom: var(--border-default);

  &:first-of-type {
    border-bottom: unset;
    padding: unset;
  }

  @media (max-width: 991px) {
    display: none !important;
  }
}

.spotlight-ad-break-inlist {
  text-align: center;
  padding: 20px 0;
  border-bottom: var(--border-default);
}
