/* interleaf_zblog theme additions: navbar module links, native comments,
   list variants and pagination, styled with the ported design tokens. */

/* ------------------------------------------------------------------ */
/* Navbar (Z-Blog navbar module <li> items)                            */
/* ------------------------------------------------------------------ */

nav[aria-label="Site Navigation"] ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

nav[aria-label="Site Navigation"] li {
  margin: 0;
  padding: 0;
}

nav[aria-label="Site Navigation"] a {
  position: relative;
  display: inline-block;
  transition: font-weight 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

nav[aria-label="Site Navigation"] a::after {
  position: absolute;
  left: 0;
  bottom: 0.7em;
  z-index: -1;
  height: 0.5em;
  width: 100%;
  background-color: oklch(var(--un-preset-theme-colors-highlight));
  content: "";
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform var(--dur-hover, 0.5s) var(--ease-ink, ease-out);
}

nav[aria-label="Site Navigation"] a:hover {
  color: oklch(var(--un-preset-theme-colors-primary) / 1);
  font-weight: 700;
}

nav[aria-label="Site Navigation"] a:hover::after,
nav[aria-label="Site Navigation"] a.highlight-static::after {
  transform-origin: bottom left;
  transform: scaleX(1);
}

html.dark nav[aria-label="Site Navigation"] a::after {
  display: none;
}

html.reduce-motion nav[aria-label="Site Navigation"] a,
html.reduce-motion nav[aria-label="Site Navigation"] a::after {
  transition: inherit;
}

/* ------------------------------------------------------------------ */
/* Pagination                                                          */
/* ------------------------------------------------------------------ */

.pagebar-nav {
  margin-block: 2rem;
  font-family: STIX, EarlySummer-Subset, EarlySummer, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  line-height: 1.25em;
}

.pagebar-nav a {
  display: inline-block;
  margin-inline-end: .75em;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
  transition: color .15s ease-out;
}

.pagebar-nav a:hover,
.pagebar-nav a.active {
  color: oklch(var(--un-preset-theme-colors-primary) / 1);
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Native comments                                                     */
/* ------------------------------------------------------------------ */

.comments {
  margin-block-start: 2rem;
}

.comments-title {
  margin: 0 0 1.25rem;
  font-family: STIX-Italic, EarlySummer-Subset, EarlySummer, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: .875rem;
  font-weight: 400;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
}

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

.comment {
  margin-block-end: 0;
}

.comment-body {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: .75rem;
  row-gap: .25rem;
  align-items: start;
  padding-block: .875rem;
}

.comment-body > .comment-avatar {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  display: block;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border-radius: .375rem;
}

.comment-body > .comment-meta {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.comment-body > .comment-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.comment-body > .comment-children {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
}

.comment + .comment > .comment-body {
  border-block-start: 1px solid oklch(var(--un-preset-theme-colors-hairline) / 1);
}

.comment-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: .625rem;
  height: auto;
  margin: 0;
  padding: 0;
  font-size: .875rem;
  line-height: 1.5rem;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
}

.comment-body .comment-meta > .comment-author,
.comment-body .comment-meta > .comment-time,
.comment-body .comment-meta > .comment-reply {
  display: inline;
  flex: 0 0 auto;
  height: auto;
  margin: 0;
  padding: 0;
  line-height: 1.5rem;
}

.comment-body .comment-meta > .comment-reply {
  margin-inline-start: auto;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: .75rem;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
  cursor: pointer;
  transition: color .15s ease-out;
}

.comment-reply:hover {
  color: oklch(var(--un-preset-theme-colors-primary) / 1);
}

.comment-author {
  font-weight: 700;
  color: oklch(var(--un-preset-theme-colors-primary) / 1);
}

.comment-body .comment-meta > .comment-time {
  font-family: STIX, EarlySummer-Subset, EarlySummer, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: .75rem;
  font-style: normal;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
}

.comment-content {
  font-size: .875rem;
  line-height: 1.5rem;
}

.comment-content p {
  margin: 0 0 .5em;
}

.comment-children {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Comment form */

#divCommentPost {
  margin-block-start: 2rem;
}

.posttop {
  margin: 0 0 1rem;
  font-family: STIX-Italic, EarlySummer-Subset, EarlySummer, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: .875rem;
  font-weight: 400;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
}

#divCommentPost p {
  margin-block-end: .75rem;
}

#divCommentPost label {
  margin-inline-end: .5em;
  font-family: STIX-Italic, EarlySummer-Subset, EarlySummer, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  font-size: .875rem;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
}

#divCommentPost input[type="text"],
#divCommentPost input[type="email"],
#divCommentPost input[type="url"],
#divCommentPost textarea {
  padding: .375rem .625rem;
  border: 1px solid oklch(var(--un-preset-theme-colors-secondary) / 0.25);
  border-radius: .25rem;
  background-color: transparent;
  color: oklch(var(--un-preset-theme-colors-primary) / 1);
  font-size: .875rem;
}

#divCommentPost input:focus-visible,
#divCommentPost textarea:focus-visible {
  outline: 1px solid oklch(var(--un-preset-theme-colors-primary) / 0.8);
  outline-offset: 2px;
}

#divCommentPost textarea {
  display: block;
  width: 100%;
  min-height: 7rem;
  resize: vertical;
}

.comment-submit {
  padding: .375rem 1rem;
  border: none;
  border-radius: .25rem;
  background-color: oklch(var(--un-preset-theme-colors-primary) / 1);
  color: oklch(var(--un-preset-theme-colors-background) / 1);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
  transition: opacity .15s ease-out;
}

.comment-submit:hover {
  opacity: .8;
}

/* ------------------------------------------------------------------ */
/* Card grid list variant (list-card)                                  */
/* ------------------------------------------------------------------ */

.list-card-grid {
  display: grid;
  margin-block-start: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.5rem 1.25rem;
}

.list-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid oklch(var(--un-preset-theme-colors-hairline) / 1);
  border-radius: .375rem;
  transition: border-color .15s ease-out;
}

.list-card:hover {
  border-color: oklch(var(--un-preset-theme-colors-primary) / .35);
}

.list-card-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
}

.list-card-title a {
  color: oklch(var(--un-preset-theme-colors-primary) / 1);
}

.list-card-date {
  margin-block: .5rem;
  font-size: .875rem;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
}

.list-card-intro {
  font-size: .9375rem;
  line-height: 1.625;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

/* ------------------------------------------------------------------ */
/* Media rows list variant (list-media)                                */
/* ------------------------------------------------------------------ */

.list-media {
  margin-block-start: 1.5rem;
  padding: 0;
  list-style: none;
}

.list-media-item {
  display: flex;
  gap: 1.25rem;
  margin-block-end: 1.5rem;
}

.list-media-thumb {
  flex: 0 0 auto;
  width: 9.5rem;
  overflow: hidden;
  border-radius: .25rem;
}

.list-media-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-media-body {
  flex: 1 1 auto;
  min-width: 0;
}

.list-media-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
}

.list-media-title a {
  color: oklch(var(--un-preset-theme-colors-primary) / 1);
}

.list-media-date {
  margin-block: .375rem;
  font-size: .875rem;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
}

.list-media-intro {
  font-size: .9375rem;
  line-height: 1.625;
  color: oklch(var(--un-preset-theme-colors-secondary) / 1);
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 640px) {
  .list-media-item {
    flex-direction: column;
    gap: .75rem;
  }

  .list-media-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}
