/*
 * Comment section, design 3.1 (artboard "Kommentare", approved 2026-11-04).
 * Markup: includes/comments-template.php. Values from the artboard; desktop
 * and phone (<= 767px, Divi's phone breakpoint) only, as in the design.
 */

.dw-comments {
  --dwc-ink: var(--dw-ink, #17100f);
  --dwc-text: #4a423f;
  --dwc-meta: var(--dw-meta, #6b6259);
  --dwc-line: var(--dw-line, #e7e0d9);
  --dwc-sand: var(--dw-sand, #fbece3);
  --dwc-paper: var(--dw-paper, #fffdfb);
  --dwc-creme: var(--dw-creme, #fff3e8);
  --dwc-sage-light: var(--dw-sage-light, #bdead5);
  --dwc-ink-hover: var(--dw-ink-hover, #3d2b22);
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--dwc-ink);
  text-align: left;
}

/* Theme Builder body "Alle Beiträge": reading column after the author box. */
.dw-comments-module--post .dw-comments {
  margin-top: 24px;
  padding-top: 48px;
  border-top: 1px solid var(--dwc-line);
}

/* Own layouts (Test, Kaufen): last section before the footer, two columns. */
.dw-comments-module--split .dw-comments {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px 64px;
}
.dw-comments-module--split .dw-comments__head {
  flex: 1 1 280px;
  max-width: 360px;
}
.dw-comments-module--split .dw-comments__main {
  flex: 999 1 560px;
  min-width: 0;
  max-width: 720px;
}

.dw-comments__main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Head: label, H2 with total, note on age, "Frage stellen". */
.dw-comments__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dw-comments .dw-comments__label,
.dw-comments .dw-comments__closed-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--dwc-meta);
}
.dw-comments h2.dw-comments__title {
  margin: 0;
  padding: 0;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--dwc-ink);
}
.dw-comments-module--split h2.dw-comments__title {
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.dw-comments .dw-comments__hint,
.dw-comments .dw-form-note,
.dw-comments .logged-in-as,
.dw-comments .dw-comment__note {
  margin: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--dwc-meta);
}
.dw-comments .dw-comments__invite {
  margin: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--dwc-text);
}

/* Outline buttons: "Frage stellen", "Ältere / Neuere Kommentare". */
.dw-comments .dw-comments__btn,
.dw-comments .dw-comments__nav-links a {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 22px;
  border: 2px solid var(--dwc-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--dwc-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.dw-comments .dw-comments__btn:hover,
.dw-comments .dw-comments__nav-links a:hover {
  background: var(--dwc-ink);
  color: var(--dwc-creme);
}

/* List and threads. */
.dw-comments ol.dw-comments__list,
.dw-comments ol.children {
  margin: 0;
  padding: 0;
  list-style: none;
}
.dw-comments ol.dw-comments__list > li.dw-comment {
  padding: 28px 0;
  border-top: 1px solid var(--dwc-line);
}
.dw-comments li.dw-comment {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
  list-style: none;
}
.dw-comments li.dw-comment::before,
.dw-comments li.dw-comment::marker {
  content: none;
}
.dw-comments ol.children {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-left: 32px !important; /* Divi: .comment .children { padding-left: 0 !important } */
  border-left: 1px solid var(--dwc-line);
}
.dw-comment__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.dw-comment__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.dw-comments .dw-comment__author {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--dwc-ink);
}
.dw-comments .dw-comment__chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--dwc-sage-light);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--dwc-ink);
}
.dw-comments .dw-comment__chip--pending {
  background: var(--dwc-sand);
}
.dw-comments .dw-comment__date,
.dw-comments .dw-comments__page {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--dwc-meta);
}
.dw-comments .dw-comment__text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--dwc-text);
  overflow-wrap: anywhere;
}
.dw-comments .dw-comment__text p {
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.dw-comments .dw-comment__text p + p {
  margin-top: 0.8em;
}
.dw-comments .dw-comment__text a,
.dw-comments .dw-form-privacy a {
  color: var(--dwc-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* Text links: "Antworten", "Abbrechen". Divi's script adds et_pb_button to
   reply links, which the site turns into full-width pills on phones. */
.dw-comments a.comment-reply-link,
.dw-comments #cancel-comment-reply-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  float: none;
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--dwc-ink);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  width: auto !important;
}
.dw-comments a.comment-reply-link:hover,
.dw-comments #cancel-comment-reply-link:hover {
  text-decoration-line: underline;
}
.dw-comments a.comment-reply-link::after,
.dw-comments #cancel-comment-reply-link::after {
  content: none;
}

/* Pages. */
.dw-comments__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--dwc-line);
}
.dw-comments__nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Form: new comment and reply (WordPress moves #respond under the comment). */
.dw-comments #respond {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 32px;
  border-radius: 24px;
  background: var(--dwc-sand);
}
/* Reply form: comment-reply.js puts it right after the comment's article; it
   sits one level in, on the thread line, like the next reply would. */
.dw-comments li.dw-comment > #respond {
  position: relative;
  margin-left: 33px;
}
.dw-comments li.dw-comment > #respond::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: -24px;
  left: -33px;
  border-left: 1px solid var(--dwc-line);
}
.dw-comments li.dw-comment > #respond:last-child::before {
  bottom: 0;
}
.dw-comments #respond h3#reply-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--dwc-ink);
}
.dw-comments #respond h3#reply-title small {
  display: inline-flex;
  font-size: inherit;
}
.dw-comments form.dw-comment-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 12px;
  margin: 0;
  padding: 0;
}
.dw-comments form.dw-comment-form > * {
  flex: 0 0 100%;
  margin: 0;
  padding: 0;
}
.dw-comments form.dw-comment-form > .comment-form-author,
.dw-comments form.dw-comment-form > .comment-form-email {
  flex: 1 1 220px;
  min-width: 0;
}
.dw-comments .dw-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dw-comments .dw-input {
  display: block;
}
.dw-comments .dw-field label {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--dwc-ink);
}
body .dw-comments #commentform textarea,
body .dw-comments #commentform input[type="text"],
body .dw-comments #commentform input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid var(--dwc-line);
  background: var(--dwc-paper);
  color: var(--dwc-ink);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
}
body .dw-comments #commentform textarea {
  min-height: 160px;
  padding: 16px 20px;
  border-radius: 20px;
  line-height: 1.6;
  resize: vertical;
}
body .dw-comments #commentform input[type="text"],
body .dw-comments #commentform input[type="email"] {
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  line-height: 1.2;
}
body .dw-comments #commentform textarea:focus,
body .dw-comments #commentform input:focus {
  border-color: var(--dwc-ink);
}
.dw-comments .form-submit {
  display: flex;
}
body .dw-comments #commentform button.dw-comments__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--dwc-ink);
  color: var(--dwc-creme);
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
body .dw-comments #commentform button.dw-comments__submit:hover {
  background: var(--dwc-ink-hover);
}

/* Closed: the list stays, a sand box replaces the form. */
.dw-comments__closed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border-radius: 20px;
  background: var(--dwc-sand);
}
.dw-comments .dw-comments__closed-label {
  color: var(--dwc-ink);
}
.dw-comments .dw-comments__closed p {
  margin: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--dwc-text);
}

/* Phone: same rules, narrower indents, text 16, form buttons full width. */
@media (max-width: 767px) {
  .dw-comments h2.dw-comments__title {
    font-size: 26px;
  }
  .dw-comments-module--split h2.dw-comments__title {
    font-size: 32px;
  }
  .dw-comments ol.dw-comments__list > li.dw-comment {
    padding: 24px 0;
  }
  .dw-comments ol.children {
    padding-left: 16px !important;
  }
  .dw-comments .dw-comment__text {
    font-size: 16px;
  }
  .dw-comments #respond {
    padding: 24px 20px;
  }
  .dw-comments li.dw-comment > #respond {
    margin-left: 17px;
  }
  .dw-comments li.dw-comment > #respond::before {
    left: -17px;
  }
  .dw-comments #respond h3#reply-title {
    font-size: 20px;
  }
  .dw-comments .form-submit,
  body .dw-comments #commentform button.dw-comments__submit {
    width: 100%;
  }
}
