/* ═══════════════════════════════════════════════
   T3 Comment Block — Music-service style
   ═══════════════════════════════════════════════ */

/* ── Section wrapper ── */
.mzk-comments {
  margin-top: 30px;
}

.mzk-comments__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-primary, #111827);
}

.mzk-comments__title-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--color-text-secondary, #64748b);
}

.mzk-comments__error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--color-danger-border, #f3c3c3);
  border-radius: 10px;
  background: var(--color-danger-bg, #fdf2f2);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-danger-text, #b42318);
}

.mzk-comments__count {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  place-items: center;
  border-radius: 14px;
  background: var(--color-bg-muted, #f5f6fa);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary, #64748b);
}

.mzk-comments__empty {
  display: grid;
  min-height: 190px;
  margin-top: 20px;
  padding: 42px 20px;
  place-items: center;
  align-content: center;
  gap: 14px;
  border-top: 1px solid var(--color-border, #e4e6ec);
  color: var(--color-text-secondary, #64748b);
  text-align: center;
}

.mzk-comments__empty svg {
  width: 42px;
  height: 42px;
  color: var(--color-text-tertiary, #b4b8c4);
}

.mzk-comments__empty p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.mzk-comments .mzk-cf__textarea {
  min-height: 96px;
}

/* ── Comment form ── */
.mzk-cf {
  margin-bottom: 28px;
}

.mzk-cf__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.mzk-cf__avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg-muted, #f5f6fa);
}

.mzk-cf__avatar--input {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.mzk-cf__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary, #1e2638);
}

.mzk-cf__guest {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mzk-cf__guest-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--color-border, #e4e6ec);
  border-radius: 50%;
  background: var(--color-bg-muted, #f5f6fa);
  color: var(--color-text-secondary, #8b90a0);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.mzk-cf__guest-avatar svg {
  width: 20px;
  height: 20px;
}

.mzk-cf__guest-avatar [data-guest-initials] {
  display: none;
}

.mzk-cf__guest-avatar.is-named {
  color: #fff;
  background: var(--mzk-avatar-bg, #475569);
  border-color: transparent;
}

.mzk-cf__guest-avatar.is-named svg {
  display: none;
}

.mzk-cf__guest-avatar.is-named [data-guest-initials] {
  display: inline;
}

.mzk-cf__guest-save {
  min-width: 110px;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: #ffa200;
  color: #0b1118;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: filter .16s ease, transform .16s ease;
}

.mzk-cf__guest .mzk-cf__input {
  height: 44px;
}

.mzk-cf__guest-save:hover {
  filter: brightness(1.06);
}

.mzk-cf__guest-save:active {
  transform: scale(.97);
}

.mzk-cf__input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--color-border, #e4e6ec);
  border-radius: 12px;
  background: var(--color-bg-muted, #f5f6fa);
  color: var(--color-text-primary, #1e2638);
  font: inherit;
  font-size: 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
  box-sizing: border-box;
}

.mzk-cf__input::placeholder {
  color: var(--color-text-tertiary, #b4b8c4);
}

.mzk-cf__input:focus {
  border-color: var(--color-primary, #5b21ed);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 91,33,237), .12);
  background: var(--color-bg-app, #fff);
}

.mzk-cf__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.mzk-cf__field {
  flex: 1;
  min-width: 0;
}

.mzk-cf__textarea {
  width: 100%;
  min-height: 48px;
  max-height: 180px;
  padding: 12px 14px;
  border: 1px solid var(--color-border, #e4e6ec);
  border-radius: 12px;
  background: var(--color-bg-muted, #f5f6fa);
  color: var(--color-text-primary, #1e2638);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  box-sizing: border-box;
}

.mzk-cf__textarea::placeholder {
  color: var(--color-text-tertiary, #b4b8c4);
}

.mzk-cf__textarea:focus {
  border-color: var(--color-primary, #5b21ed);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb, 91,33,237), .12);
  background: var(--color-bg-app, #fff);
}

.mzk-cf__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  height: 40px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--color-primary, #5b21ed);
  color: var(--color-on-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, transform .1s ease;
}

.mzk-cf__submit svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.mzk-cf__submit:hover {
  background: var(--color-primary-hover, #4c1dca);
}

.mzk-cf__submit:active {
  transform: scale(.97);
}

.mzk-cf__submit:disabled {
  background: var(--color-text-tertiary, #b4b8c4);
  cursor: default;
  transform: none;
}

.mzk-cf__subscribe {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--color-text-secondary, #8b90a0);
  font-size: 12px;
  cursor: pointer;
}

.mzk-cf__subscribe input[type="checkbox"] {
  accent-color: var(--color-primary, #5b21ed);
}

.mzk-cf__avatar-wrap {
  flex: 0 0 40px;
}

.mzk-cf__avatar-wrap img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg-muted, #f5f6fa);
}

.mzk-cf__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.mzk-cf__counter {
  margin-right: auto;
  color: var(--color-text-tertiary, #b4b8c4);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mzk-cf__captcha {
  min-width: 0;
  margin-top: 14px;
}

.mzk-cf__captcha--code {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.mzk-cf__captcha-image,
.mzk-cf__captcha-image a,
.mzk-cf__captcha-image #dle-captcha {
  display: block;
  line-height: 0;
}

.mzk-cf__captcha-image img {
  display: block;
  width: 160px;
  max-width: 100%;
  height: 80px;
  border: 1px solid var(--color-border, #e4e6ec);
  border-radius: 12px;
  object-fit: cover;
}

.mzk-cf__captcha-field,
.mzk-cf__captcha--question {
  display: grid;
  gap: 7px;
  color: var(--color-text-secondary, #8b90a0);
  font-size: 12px;
  font-weight: 650;
}

.mzk-cf__captcha-field {
  width: min(280px, 100%);
}

.mzk-cf__captcha--question {
  max-width: 520px;
}

.mzk-cf__captcha--service {
  max-width: 100%;
  overflow-x: auto;
}

.mzk-cf__captcha-question {
  line-height: 1.45;
}

.mzk-cmts__load-more {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  border: 1px dashed var(--color-border, #e4e6ec);
  border-radius: 12px;
  background: transparent;
  color: var(--color-text-secondary, #8b90a0);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.mzk-cmts__load-more:hover,
.mzk-cmts__load-more:focus-visible {
  color: var(--color-primary, #5b21ed);
  border-color: var(--color-primary, #5b21ed);
  background: rgba(var(--color-primary-rgb), .04);
  outline: none;
}

.mzk-cmts__load-more:disabled {
  opacity: .6;
  cursor: default;
  pointer-events: none;
}

/* ── Comments list ── */
.mzk-cmts {
  display: flex;
  flex-direction: column;
}

.mzk-comments:not(.mzk-comments--empty) .mzk-cmts {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border, #e4e6ec);
}

/* ── DLE tree-comments wrapper resets ── */
#dlemasscomments,
#dle-comments-list {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

#dle-comments-list {
  display: flex;
  flex-direction: column;
}

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

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

.comments-tree-item > .comments-tree-list {
  margin: 0 0 0 52px;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--color-border, #e4e6ec);
}

#dle-comments-list > .comments-tree-list + .comments-tree-list {
  margin-top: 0;
  padding-top: 0;
}

#dle-ajax-comments {
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-size: 0;
  line-height: 0;
}

/* ── Single comment ── */
.mzk-cmt {
  display: flex;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border, #e4e6ec);
}

.comments-tree-item > .comments-tree-list .mzk-cmt {
  padding: 14px 0;
}

.mzk-cmts .comments-tree-item:first-child > .mzk-cmt,
.mzk-cmts > .mzk-cmt:first-child {
  padding-top: 0;
}

.mzk-cmts .comments-tree-item:last-child > .mzk-cmt,
.mzk-cmts > .mzk-cmt:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Avatar */
.mzk-cmt__avatar {
  flex: 0 0 40px;
}

.mzk-cmt__avatar img {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-bg-muted, #f5f6fa);
}

.mzk-cmt__avatar-fallback {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--mzk-avatar-bg, #475569);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* Body */
.mzk-cmt__body {
  flex: 1;
  min-width: 0;
}

/* Heading */
.mzk-cmt__heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text-primary, #1e2638);
}

/* Header */
.mzk-cmt__head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.mzk-cmt__author {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary, #1e2638);
  text-decoration: none;
}

.mzk-cmt__author:hover {
  color: var(--color-primary, #5b21ed);
}

.mzk-cmt__author a {
  color: inherit;
  text-decoration: none;
}

.mzk-cmt__author a:hover {
  color: var(--color-primary, #5b21ed);
}

.mzk-cmt__date {
  font-size: 13px;
  color: var(--color-text-secondary, #8b90a0);
}

/* Text */
.mzk-cmt__text {
  margin-top: 6px;
  max-width: 900px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text-primary, #1e2638);
  overflow-wrap: anywhere;
}

.mzk-cmt__text img {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

/* Actions */
.mzk-cmt__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.mzk-cmt__spacer {
  flex: 1;
}

.mzk-cmt__action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-secondary, #8b90a0);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.mzk-cmt__action:hover,
.mzk-cmt__action:focus-visible {
  color: var(--color-primary, #5b21ed);
  outline: none;
}

.mzk-cmt__action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.mzk-cmt__like svg {
  width: 15px;
  height: 15px;
}

.mzk-cmt__like-val {
  font-variant-numeric: tabular-nums;
}

.mzk-cmt__like.is-active {
  color: var(--color-success, #22c55e);
}

.mzk-cmt__like.is-active svg {
  fill: currentColor;
  stroke: currentColor;
}

.mzk-cmt__actions button:focus-visible {
  outline: 2px solid var(--color-primary, #5b21ed);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Nested replies */
.comments-tree-item > .comments-tree-list .mzk-cmt__avatar img,
.comments-tree-item > .comments-tree-list .mzk-cmt__avatar-fallback {
  width: 32px;
  height: 32px;
}

.comments-tree-item > .comments-tree-list .mzk-cmt__avatar-fallback {
  font-size: 12px;
}

.comments-tree-item > .comments-tree-list .mzk-cmt__author {
  font-size: 13px;
}

.comments-tree-item > .comments-tree-list .mzk-cmt__date {
  font-size: 12px;
}

.comments-tree-item > .comments-tree-list .mzk-cmt__text {
  font-size: 14px;
}

/* ── Mobile adjustments ── */
@media (max-width: 767px) {
  .mzk-comments__title {
    font-size: 18px;
  }

  .mzk-comments__empty {
    min-height: 160px;
    padding: 34px 16px;
  }

  .mzk-comments .mzk-cf__textarea {
    min-height: 88px;
  }

  .mzk-cf__guest {
    grid-template-columns: 40px minmax(0,1fr) auto;
    gap: 8px;
  }

  .mzk-cf__guest-avatar {
    width: 40px;
    height: 40px;
  }

  .mzk-cf__guest-save {
    min-width: 96px;
    padding-inline: 14px;
  }

  .mzk-cf__row {
    flex-wrap: wrap;
  }

  .mzk-cf__avatar-wrap {
    flex: 0 0 36px;
  }

  .mzk-cf__avatar-wrap img {
    width: 36px;
    height: 36px;
  }

  .mzk-cf__footer {
    justify-content: stretch;
  }

  .mzk-cf__submit {
    flex: 1;
    width: 100%;
    min-height: 44px;
    margin-top: 0;
  }

  .mzk-cmt {
    gap: 10px;
    padding: 16px 0;
  }

  .mzk-cmt__avatar,
  .mzk-cmt__avatar img,
  .mzk-cmt__avatar-fallback {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .mzk-cmt__avatar-fallback {
    font-size: 13px;
  }

  .mzk-cmt__author {
    font-size: 13px;
  }

  .mzk-cmt__date {
    font-size: 12px;
  }

  .mzk-cmt__text {
    font-size: 14px;
  }

  .comments-tree-item > .comments-tree-list {
    margin-left: 36px;
    padding-left: 12px;
  }
}

@media (max-width: 479px) {
  .comments-tree-item > .comments-tree-list {
    margin-left: 24px;
    padding-left: 10px;
  }
}