/* ==========================================================================
   ILAMA BOOKS — COMMENTS
   Used on: single blog posts + book product pages
   ========================================================================== */

/* ── Wrapper ── */
#il-comments {
  margin-top: 56px;
  margin-bottom: 72px;   /* keeps comments away from footer and related posts */
  padding-top: 48px;
  border-top: 1px solid #e4e4e7;
  font-family: "Lato", "Segoe UI", Roboto, Arial, sans-serif;
}

.il-comments__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Section heading ── */
.il-comments__title {
  font-size: 22px;
  font-weight: 800;
  color: var(--il-ink, #18181b);
  margin: 0 0 32px;
}
.il-comments__count {
  color: var(--il-accent, #ff6428);
}

/* ── Comment list ── */
.il-comment-list {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Nested replies indented */
.il-comment-list .children {
  list-style: none;
  margin: 16px 0 0 48px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 2px solid #f0f0f0;
  padding-left: 20px;
}

/* ── Individual comment card ── */
.il-comment__article {
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 20px 24px;
}

/* ── Comment header (avatar + name + date) ── */
.il-comment__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.il-comment__avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.il-comment__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.il-comment__author {
  font-weight: 700;
  font-size: 15px;
  color: var(--il-ink, #18181b);
}

.il-comment__date {
  font-size: 13px;
  color: #71717a;
}

.il-comment__edit {
  font-size: 13px;
  color: var(--il-accent, #ff6428) !important;
  margin-left: auto;
  text-decoration: none !important;
}
.il-comment__edit:hover {
  text-decoration: underline !important;
}

/* ── Comment body text ── */
.il-comment__body {
  font-size: 15px;
  line-height: 1.65;
  color: #3f3f46;
}
.il-comment__body p {
  margin: 0 0 10px;
}
.il-comment__body p:last-child {
  margin-bottom: 0;
}

/* ── Pending notice ── */
.il-comment__pending {
  font-size: 13px;
  color: #a1a1aa;
  margin: 0 0 10px;
}

/* ── Reply link ── */
.il-comment__footer {
  margin-top: 12px;
}
.il-comment__footer .comment-reply-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--il-accent, #ff6428) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.il-comment__footer .comment-reply-link:hover {
  text-decoration: underline !important;
}

/* ── Pagination ── */
.il-comments-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  font-size: 14px;
}
.il-comments-nav a {
  color: var(--il-accent, #ff6428) !important;
  font-weight: 600;
  text-decoration: none !important;
}
.il-comments-nav a:hover {
  text-decoration: underline !important;
}

.il-comments-closed {
  color: #71717a;
  font-size: 15px;
  margin-bottom: 24px;
}

/* ── Comment FORM ── */
.il-comment-respond {
  margin-top: 40px;
}

#reply-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--il-ink, #18181b);
  margin: 0 0 24px;
}

#reply-title small {
  font-size: 14px;
  font-weight: 400;
  margin-left: 10px;
}
#reply-title small a {
  color: var(--il-accent, #ff6428) !important;
  text-decoration: none !important;
}

.il-comment-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.il-comment-form__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.il-comment-form__row--full {
  grid-column: 1 / -1;
}

.il-comment-form__row--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}
.il-comment-form__row--check input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--il-accent, #ff6428);
}

.il-comment-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--il-ink, #18181b);
}
.il-comment-form label .required {
  color: var(--il-accent, #ff6428);
  margin-left: 2px;
}

.il-comment-form input[type="text"],
.il-comment-form input[type="email"],
.il-comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d4d4d8;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--il-ink, #18181b);
  background: #fff;
  transition: border-color .15s;
  outline: none;
  resize: vertical;
}
.il-comment-form input[type="text"]:focus,
.il-comment-form input[type="email"]:focus,
.il-comment-form textarea:focus {
  border-color: var(--il-accent, #ff6428);
  box-shadow: 0 0 0 3px rgba(255, 100, 40, .12);
}
.il-comment-form input::placeholder,
.il-comment-form textarea::placeholder {
  color: #a1a1aa;
}

.il-comment-form__submit {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.il-comment-submit {
  padding: 12px 28px;
  font-size: 15px;
}

#cancel-comment-reply-link {
  font-size: 14px;
  color: #71717a !important;
  text-decoration: none !important;
}
#cancel-comment-reply-link:hover {
  color: var(--il-accent, #ff6428) !important;
}

/* ── Logged-in note ── */
.il-comment-respond .logged-in-as {
  font-size: 14px;
  color: #71717a;
  margin-bottom: 20px;
}
.il-comment-respond .logged-in-as a {
  color: var(--il-accent, #ff6428) !important;
}

/* ==========================================================================
   ABOUT THE AUTHOR CARD
   ========================================================================== */

.il-author-card-wrap {
  padding: 0 0 8px;
}

.il-author-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 32px;
  background: #fff8f5;
  border: 1.5px solid rgba(255, 100, 40, .15);
  border-radius: 14px;
  font-family: "Lato", "Segoe UI", Roboto, Arial, sans-serif;
}

/* Avatar / initials */
.il-author-card__avatar-link {
  flex-shrink: 0;
  display: block;
  text-decoration: none !important;
}

.il-author-card__photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  transition: transform .2s;
}
.il-author-card__avatar-link:hover .il-author-card__photo {
  transform: scale(1.05);
}

.il-author-card__initials {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--il-accent, #ff6428), #ff9a6c);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(255, 100, 40, .3);
  transition: transform .2s;
}
.il-author-card__avatar-link:hover .il-author-card__initials {
  transform: scale(1.05);
}

/* Info column */
.il-author-card__info {
  flex: 1;
  min-width: 0;
}

.il-author-card__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--il-accent, #ff6428);
  margin: 0 0 4px;
}

.il-author-card__name {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 20px;
  font-weight: 800;
  color: #18181b !important;
  text-decoration: none !important;
  margin-bottom: 10px;
  transition: color .15s;
}
.il-author-card__name:hover {
  color: var(--il-accent, #ff6428) !important;
}
.il-author-card__name svg {
  width: 16px;
  height: 16px;
  opacity: .5;
  flex-shrink: 0;
}

.il-author-card__bio {
  font-size: 15px;
  line-height: 1.65;
  color: #52525b;
  margin: 0;
}

@media (max-width: 540px) {
  .il-author-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    gap: 16px;
  }
  .il-author-card__name {
    justify-content: center;
  }
}

/* ── Honeypot — invisible to humans, visible to bots ── */
.il-hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .il-comment-form {
    grid-template-columns: 1fr;
  }
  .il-comment-list .children {
    margin-left: 20px;
    padding-left: 12px;
  }
}