/*
 * Blog: index, archives, single post, comments
 * Enqueued only on the pages that need it (see mshop_enqueue_conditional_styles()
 * in functions.php) to keep the CSS payload smaller on the rest of the site.
 * Loads after main.css, so it can safely build on the shared base styles.
 */

/* Blog: category chips */
.mshop-blog-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.mshop-blog-categories a {
  padding: 9px 16px;
  border: 1px solid #e8eaf0;
  border-radius: 999px;
  color: #4a5164;
  font-size: 12.5px;
  font-weight: 750;
}

.mshop-blog-categories a:hover {
  border-color: var(--mshop-accent);
  color: var(--mshop-accent);
}

.mshop-blog-categories a.is-active {
  border-color: var(--mshop-accent);
  background: var(--mshop-accent);
  color: #fff;
}

/* Blog: featured/hero post */
.mshop-post-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid #e8eaf0;
  border-radius: 22px;
  background: #fff;
}

.mshop-post-hero__image {
  display: block;
  overflow: hidden;
}

.mshop-post-hero__image img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.mshop-post-hero__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 34px;
}

.mshop-post-hero__category {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.1);
  color: var(--mshop-accent);
  font-size: 11px;
  font-weight: 800;
}

.mshop-post-hero__body h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.5;
}

.mshop-post-hero__body h2 a {
  color: #202838;
}

/* Blog: post card additions (category badge + meta row) */
.mshop-post-card__image {
  position: relative;
}

.mshop-post-card__category {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(17, 20, 30, 0.72);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
}

.mshop-post-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #969caa;
  font-size: 10.5px;
}

.mshop-post-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

/* Single post: meta row, tags, share, author box */
.mshop-post-meta-row--single {
  margin-bottom: 14px;
  font-size: 12px;
}

.mshop-post-meta-row__category {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.1);
  color: var(--mshop-accent);
  font-size: 11px;
  font-weight: 800;
}

.mshop-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.mshop-entry-tags a {
  padding: 7px 14px;
  border: 1px solid #e8eaf0;
  border-radius: 999px;
  color: #4a5164;
  font-size: 11.5px;
}

.mshop-entry-tags a:hover {
  border-color: var(--mshop-accent);
  color: var(--mshop-accent);
}

.mshop-entry-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid #eef0f4;
}

.mshop-entry-share__label {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.mshop-entry-share a,
.mshop-entry-share__copy {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  background: #fff;
  color: #4a5164;
  cursor: pointer;
  place-items: center;
}

.mshop-entry-share a:hover,
.mshop-entry-share__copy:hover {
  border-color: var(--mshop-accent);
  color: var(--mshop-accent);
}

.mshop-entry-share .mshop-icon,
.mshop-entry-share__copy .mshop-icon {
  width: 17px;
  height: 17px;
}

.mshop-entry-share__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding-inline: 12px;
  font-size: 11px;
  font-weight: 700;
}

.mshop-entry-share__copy.is-copied {
  border-color: #16a34a;
  color: #16a34a;
}

.mshop-author-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 26px;
  padding: 20px;
  border: 1px solid #e8eaf0;
  border-radius: 18px;
  background: #fafbfc;
}

.mshop-author-box img {
  border-radius: 50%;
}

.mshop-author-box__label {
  display: block;
  margin-bottom: 4px;
  color: #9298a5;
  font-size: 10.5px;
}

.mshop-author-box__body strong {
  display: block;
  margin-bottom: 6px;
  color: #202838;
  font-size: 14px;
}

.mshop-author-box__body p {
  margin: 0;
  color: #667085;
  font-size: 12.5px;
  line-height: 1.9;
}

.mshop-related-posts {
  padding-top: 46px;
}

/* Comments */
.mshop-entry-shell--comments {
  margin-top: 40px;
}

.mshop-comments__title {
  margin: 0 0 22px;
  color: #202838;
  font-size: 19px;
  font-weight: 900;
}

.mshop-comments__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.mshop-comments__list .children {
  margin: 18px 0 0;
  padding-inline-start: 34px;
  list-style: none;
}

.mshop-comment {
  display: flex;
  gap: 14px;
}

.mshop-comment__avatar img {
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e8eaf0;
}

.mshop-comment__body {
  flex: 1;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid #e8eaf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mshop-comment__body:hover {
  border-color: #dfe2e8;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.07);
}

.mshop-comment__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mshop-comment__meta strong {
  color: #202838;
  font-size: 13px;
}

.mshop-comment__meta span {
  color: #9298a5;
  font-size: 10.5px;
}

.mshop-comment__text {
  color: #5f6676;
  font-size: 13px;
  line-height: 1.9;
}

.mshop-comment__text p {
  margin: 0 0 10px;
}

.mshop-comment__text p:last-child {
  margin-bottom: 0;
}

.mshop-comment__pending {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(225, 29, 72, 0.08);
  color: var(--mshop-accent);
  font-size: 10.5px;
  font-weight: 700;
}

.mshop-comment__reply {
  margin-top: 10px;
}

.mshop-comment__reply a {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 1px solid #edf0f4;
  border-radius: 999px;
  color: var(--mshop-accent);
  font-size: 11px;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mshop-comment__reply a:hover {
  background: rgba(225, 29, 72, 0.06);
  border-color: var(--mshop-accent);
}

.mshop-comments__closed {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px dashed #dfe2e8;
  border-radius: 12px;
  background: #fafafc;
  color: #667085;
  font-size: 12.5px;
}

/* Comment submission form (comment_form() call in comments.php). Scoped to
 * #respond — the id WordPress core always wraps the reply title + form in
 * — rather than a custom wrapper class, because WordPress' own reply-to-
 * comment script (addComment.moveForm()) relocates that exact element by
 * ID when a "پاسخ" link inside the thread is clicked; anchoring to #respond
 * keeps the styling intact both in its initial position and once moved.
 * pages.css defines the same .mshop-form-row / .mshop-form-grid classes for
 * the contact-page form, but that stylesheet isn't loaded on blog pages, so
 * this scoped copy gives the same styled look here without pulling in an
 * unrelated stylesheet. */
#respond {
  margin-top: 8px;
  padding: 22px;
  border: 1px solid #e8eaf0;
  border-radius: 18px;
  background: #fff;
}

#respond .mshop-comments__title {
  margin-bottom: 18px;
}

#respond .mshop-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

#respond .mshop-form-row {
  margin-bottom: 16px;
}

#respond .mshop-form-grid .mshop-form-row {
  margin-bottom: 0;
}

#respond .mshop-form-row label {
  display: block;
  margin-bottom: 7px;
  color: #343b4b;
  font-size: 12.5px;
  font-weight: 750;
}

#respond .mshop-form-row input,
#respond .mshop-form-row textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #dfe2e8;
  border-radius: 10px;
  background: #fff;
  color: #202838;
  font-size: 13px;
  transition: border-color 0.2s ease;
}

#respond .mshop-form-row textarea {
  min-height: 130px;
  resize: vertical;
}

#respond .mshop-form-row input:focus,
#respond .mshop-form-row textarea:focus {
  border-color: var(--mshop-accent);
  outline: none;
}

#respond p.form-submit {
  margin: 4px 0 0;
}

#respond .comment-notes,
#respond .logged-in-as {
  margin: 0 0 14px;
  color: #667085;
  font-size: 12px;
}

#respond .logged-in-as a {
  color: var(--mshop-accent);
}

@media (max-width: 900px) {
  .mshop-post-hero {
    grid-template-columns: 1fr;
  }

  .mshop-post-hero__image img {
    min-height: 200px;
  }

  .mshop-post-hero__body {
    padding: 24px;
  }
}

@media (max-width: 620px) {
  .mshop-post-hero__body h2 {
    font-size: 19px;
  }

  .mshop-entry-share {
    flex-wrap: wrap;
  }

  .mshop-comments__list .children {
    padding-inline-start: 18px;
  }

  .mshop-comment {
    gap: 10px;
  }

  #respond {
    padding: 16px;
  }

  #respond .mshop-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  #respond .mshop-form-grid .mshop-form-row {
    margin-bottom: 16px;
  }
}
