/* ==========================================================================
   MZF Store — Comments (discussion area)
   ========================================================================== */

.mzf-comments {
  margin-top: 48px;
  padding: 30px 30px 34px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}

/* ---------- Heading ---------- */
.mzf-comments__head {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.mzf-comments__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
}
.mzf-comments__title svg { color: var(--brand); flex-shrink: 0; }
.mzf-comments__sub {
  margin: 8px 0 0;
  color: var(--ink-muted);
  font-size: .93rem;
  line-height: 1.7;
}

/* ---------- Empty state ---------- */
.mzf-comments__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 34px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}
.mzf-comments__empty svg { color: var(--brand); opacity: .55; }
.mzf-comments__empty p { margin: 0; color: var(--ink-muted); font-size: .96rem; }

.mzf-comments__closed {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: .92rem;
}

/* ---------- List ---------- */
.mzf-comments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mzf-comments__list .children {
  list-style: none;
  margin: 16px 0 0;
  /* Nested replies indent from the inline start (right in RTL) */
  padding-inline-start: 26px;
  border-inline-start: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Comment card ---------- */
.mzf-comment { list-style: none; }
.mzf-comment__card {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.mzf-comment__card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.mzf-comment__avatar { flex-shrink: 0; }
.mzf-comment__img {
  border-radius: 50%;
  display: block;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}
.mzf-comment__main { flex: 1; min-width: 0; }

.mzf-comment__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.mzf-comment__author { font-weight: 700; color: var(--ink); }
.mzf-comment__badge {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.mzf-comment__date {
  margin-inline-start: auto;
  color: var(--ink-muted);
  font-size: .82rem;
}

.mzf-comment__pending {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--accent-050);
  color: #8a5200;
  font-size: .86rem;
  font-weight: 600;
}

.mzf-comment__text {
  color: var(--ink-2);
  font-size: .98rem;
  line-height: 1.85;
}
.mzf-comment__text > *:first-child { margin-top: 0; }
.mzf-comment__text > *:last-child { margin-bottom: 0; }
.mzf-comment__text a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.mzf-comment__actions {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font-size: .86rem;
  font-weight: 600;
}
.mzf-comment__actions a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand);
  text-decoration: none;
  transition: opacity .18s ease;
}
.mzf-comment__actions a:hover { opacity: .75; text-decoration: underline; }
.mzf-comment__edit a { color: var(--ink-muted); }

.mzf-comment--ping { padding: 12px 0; color: var(--ink-muted); font-size: .9rem; }

/* ---------- Comment pagination ---------- */
.mzf-comments__pagination { margin-top: 22px; }
.mzf-comments__pagination .nav-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.mzf-comments__pagination a,
.mzf-comments__pagination .current {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.mzf-comments__pagination .current,
.mzf-comments__pagination a:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ==========================================================================
   Comment form
   ========================================================================== */

.comment-respond { margin-top: 32px; }
.mzf-cform__title,
.comment-respond .comment-reply-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--ink);
}
.mzf-cform__cancel a,
.comment-respond .comment-reply-title small a {
  font-size: .82rem;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}
.mzf-cform__notes,
.comment-respond .comment-notes {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: .88rem;
}

/* The form itself: 2-col grid (name / email) then full-width textarea.
   Selectors are doubled with .mzf-cform so styling survives even if another
   plugin/theme strips the core .comment-form class. */
.comment-form,
.mzf-cform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 4px;
}
.mzf-cform__row { margin: 0; display: flex; flex-direction: column; gap: 7px; }
.mzf-cform__row--full,
.comment-form .comment-form-comment,
.comment-form .form-submit,
.comment-form .comment-form-cookies-consent,
.comment-form .logged-in-as,
.comment-form .comment-notes,
.mzf-cform .comment-form-comment,
.mzf-cform .form-submit,
.mzf-cform .comment-form-cookies-consent,
.mzf-cform .logged-in-as,
.mzf-cform .comment-notes { grid-column: 1 / -1; }

.comment-form label,
.mzf-cform label {
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink);
}
.mzf-cform__req { color: var(--brand); }

/* Inputs — font-family must be set explicitly: form controls do NOT inherit
   the page font in any browser, which is why the textarea rendered in the UA
   default (monospace-ish) instead of Vazirmatn. */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.mzf-cform input[type="text"],
.mzf-cform input[type="email"],
.mzf-cform input[type="url"],
.mzf-cform textarea,
#commentform input[type="text"],
#commentform input[type="email"],
#commentform input[type="url"],
#commentform textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font) !important;
  font-size: 1rem;
  line-height: 1.8;
  padding: 13px 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.comment-form input::placeholder,
.comment-form textarea::placeholder,
.mzf-cform input::placeholder,
.mzf-cform textarea::placeholder { font-family: var(--font); color: var(--ink-muted); opacity: .85; }
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus,
.mzf-cform input[type="text"]:focus,
.mzf-cform input[type="email"]:focus,
.mzf-cform input[type="url"]:focus,
.mzf-cform textarea:focus,
#commentform textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(190, 34, 46, .12);
}
.comment-form textarea,
.mzf-cform textarea,
#commentform textarea {
  resize: vertical;
  min-height: 150px;
  /* Breathing room before the submit button row. */
  margin-bottom: 4px;
}

.comment-form .comment-form-cookies-consent,
.mzf-cform .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .88rem;
  color: var(--ink-muted);
}
.comment-form .comment-form-cookies-consent input,
.mzf-cform .comment-form-cookies-consent input { accent-color: var(--brand); width: 17px; height: 17px; }
.comment-form .comment-form-cookies-consent label,
.mzf-cform .comment-form-cookies-consent label { font-weight: 500; color: inherit; }

.comment-form .logged-in-as,
.mzf-cform .logged-in-as {
  margin: 0;
  font-size: .9rem;
  color: var(--ink-muted);
}
.comment-form .logged-in-as a,
.mzf-cform .logged-in-as a { color: var(--brand); text-decoration: none; font-weight: 600; }

/* Submit row: clear separation from the textarea above it. */
.comment-form .form-submit,
.mzf-cform .form-submit {
  margin: 10px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-start;
}
.comment-form input[type="submit"],
.mzf-cform input[type="submit"],
#commentform input[type="submit"],
.mzf-cform__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 34px;
  font-family: var(--font) !important;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
  box-shadow: var(--shadow-brand);
  transition: transform .18s ease, filter .18s ease;
}
.comment-form input[type="submit"]:hover,
.mzf-cform input[type="submit"]:hover,
.mzf-cform__submit:hover { transform: translateY(-2px); filter: brightness(1.06); }
.comment-form input[type="submit"]:active,
.mzf-cform__submit:active { transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 700px) {
  .mzf-comments { padding: 22px 18px 26px; }
  .comment-form { grid-template-columns: 1fr; }
  .mzf-comment__card { flex-direction: column; gap: 12px; padding: 16px; }
  .mzf-comment__date { margin-inline-start: 0; }
  .mzf-comments__list .children { padding-inline-start: 14px; }
  .comment-form input[type="submit"],
  .mzf-cform__submit { width: 100%; }
}
