/*
 * Koharu Extras — front-end styles for the 周刊 page.
 *
 * Self-contained on purpose: every value here is a literal or a plugin class,
 * so the page reads the same under any theme. The Koharu theme's own classes
 * are layered on top by the template when it is the active theme, and these
 * rules step aside where they would fight it.
 */

.koharu-weekly-cover {
  position: relative;
  z-index: 0;
  display: flex;
  height: 60dvh;
  max-height: 50rem;
  min-height: 16rem;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  color: #fff;
  /* Stands in for the cover image when none is set, so an image-less page
     still reads as a deliberate banner rather than a blank strip. */
  background: linear-gradient(to bottom right, #3a3a52, #1a1a24);
}

.koharu-weekly-cover__img {
  position: absolute;
  inset: 0;
  z-index: -10;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.koharu-weekly-cover__overlay {
  position: absolute;
  inset: 0;
  height: 100%;
  background: rgb(0 0 0 / 0.4);
}

.koharu-weekly-cover__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  /* The bottom clearance leaves room for the theme's wave divider. */
  padding: 2rem 1.25rem 7dvh;
  text-align: center;
}

.koharu-weekly-cover__title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0.2rem 0.3rem rgb(0 0 0 / 0.5);
}

.koharu-weekly-cover__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.koharu-weekly-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.koharu-weekly-pill:hover,
.koharu-weekly-pill:focus-visible {
  transform: scale(1.05);
  background: rgb(255 255 255 / 0.2);
  color: #fff;
}

.koharu-weekly-pill svg {
  width: 1em;
  height: 1em;
}

.koharu-weekly-cover__desc {
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.75;
  opacity: 0.85;
}

.koharu-weekly-cover__desc p {
  margin: 0 0 0.5rem;
}

.koharu-weekly-cover__desc p:last-child {
  margin-bottom: 0;
}

.koharu-weekly-cover__desc a {
  color: #fff;
}

/* The card the list sits in, used only when the Koharu theme is not active;
   with it, the theme's own .content-card takes over. */
.koharu-weekly {
  width: 100%;
  max-width: 60rem;
  margin: 2rem auto;
  padding: 2rem 2.5rem;
  border-radius: 1rem;
}

.koharu-weekly__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.koharu-weekly__head h2 {
  margin: 0;
  font-size: 1.5rem;
}

.koharu-weekly__head span {
  font-size: 0.875rem;
  opacity: 0.7;
}

.koharu-weekly__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.koharu-weekly__item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.375rem 0;
}

.koharu-weekly__date {
  flex: none;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.koharu-weekly__empty {
  opacity: 0.7;
}

/* Pagination. Skipped inside the Koharu theme, where the template adds the
   theme's own .pagination class and its rules should win outright. */
.koharu-weekly-pag:not(.pagination) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 1.25rem;
}

.koharu-weekly-pag:not(.pagination) .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.koharu-weekly-pag:not(.pagination) .page-numbers.current {
  font-weight: 700;
}

@media (max-width: 768px) {
  .koharu-weekly {
    margin-inline: 1rem;
    padding: 1.5rem 1.25rem;
  }

  .koharu-weekly-cover__content {
    padding-bottom: 8dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .koharu-weekly-pill {
    transition: none;
  }

  .koharu-weekly-pill:hover,
  .koharu-weekly-pill:focus-visible {
    transform: none;
  }
}
