/* Coffee With Tanya — comments widget
   Lives at the bottom of every edition. Minimal, type-led, matches the
   coffee.css aesthetic. RTL-aware via [dir="rtl"]. */

.cwt-comments {
  margin: 4rem auto 2rem;
  max-width: 720px;
  padding: 0 1rem;
  font-family: inherit;
  color: #1a1a1a;
}

.cwt-comments__heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  letter-spacing: -0.01em;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding-top: 2rem;
}

.cwt-comments__locked {
  background: #fff8f6;
  border: 1px solid #f4d9d0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: #4a3b36;
  line-height: 1.5;
}

.cwt-comments__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.cwt-comments__name,
.cwt-comments__text {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 1rem;
  color: #1a1a1a;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.cwt-comments__name {
  max-width: 320px;
}

.cwt-comments__text {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.cwt-comments__name:focus,
.cwt-comments__text:focus {
  outline: none;
  border-color: #E8896A;
  box-shadow: 0 0 0 3px rgba(232, 137, 106, 0.18);
}

.cwt-comments__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cwt-comments__counter {
  font-size: 0.8rem;
  color: #7a6660;
  font-variant-numeric: tabular-nums;
}

.cwt-comments__counter--over { color: #c5392a; }

.cwt-comments__submit {
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.cwt-comments__submit:hover:not(:disabled) {
  background: #E8896A;
  transform: translateY(-1px);
}
.cwt-comments__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cwt-comments__status {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  min-height: 1.25em;
}
.cwt-comments__status--ok    { color: #2c7a4b; }
.cwt-comments__status--error { color: #c5392a; }

/* Specificity bump: .coffee-post-body ul has padding-left: 1.6rem to
   restore bullets in post content; we need to win against that since
   our list is decorative-only and must align flush with the heading. */
.cwt-comments .cwt-comments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-inline-start: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cwt-comments__item {
  background: #fdf6f4;
  border-radius: 10px;
  padding: 1rem 1.15rem;
}

.cwt-comments__meta {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.82rem;
  color: #7a6660;
  margin-bottom: 0.4rem;
}
.cwt-comments__author { font-weight: 600; color: #1a1a1a; }

.cwt-comments__body {
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Specificity bump to beat .coffee-post-body li { font-size: 1.0625rem }
   from coffee.css — same fight as .cwt-comments__list above. */
.cwt-comments .cwt-comments__empty {
  font-size: 13px;
  color: #7a6660;
  font-style: italic;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* RTL — Hebrew editions */
[dir="rtl"] .cwt-comments__name { max-width: 320px; }
[dir="rtl"] .cwt-comments__meta { direction: rtl; }

@media (max-width: 540px) {
  .cwt-comments { padding: 0 0.5rem; }
  .cwt-comments__submit { width: 100%; }
}
