/* Comentários das matérias. Cores: azul da marca (#2D417E) e o azul-marinho da manchete (#0F1E3D). */
.comments {
  --comments-brand: #2D417E;
  --comments-ink: #07171D;
  --comments-muted: #5B6670;
  --comments-line: #DDE0E5;
  --comments-error: #B3261E;
  --comments-ok: #1B6B3A;

  margin: 0 0 40px;
  padding-top: 28px;
  border-top: 3px solid #0F1E3D;
  color: var(--comments-ink);
}

.comments__title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}

.comments__count {
  font-size: 18px;
  font-weight: 400;
  color: var(--comments-muted);
}

.comments__notice {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--comments-muted);
}

.comments__notice a {
  color: var(--comments-brand);
  text-decoration: underline;
}

/* Formulário */
.comments__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
  padding: 18px;
  background: #F0EEEF;
  border-radius: 6px;
}

.comments__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.comments__field label {
  font-size: 15px;
  font-weight: 700;
}

.comments__field input,
.comments__field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* 16px evita o zoom automático do iOS ao focar o campo */
  color: var(--comments-ink);
  background: #fff;
  border: 1px solid #9AA3AD;
  border-radius: 4px;
}

.comments__field textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.5;
}

.comments__field input:focus-visible,
.comments__field textarea:focus-visible,
.comments__submit:focus-visible,
.comments__more-btn:focus-visible {
  outline: 3px solid var(--comments-brand);
  outline-offset: 2px;
}

.comments__field [aria-invalid="true"] {
  border-color: var(--comments-error);
}

.comments__meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.comments__error {
  margin: 0;
  font-size: 14px;
  color: var(--comments-error);
}

.comments__counter {
  flex: none;
  font-size: 13px;
  color: var(--comments-muted);
  font-variant-numeric: tabular-nums;
}

.comments__counter--near {
  color: var(--comments-error);
  font-weight: 700;
}

/* Isca anti-robô: fora da tela, sem display:none (alguns robôs ignoram campos display:none) */
.comments__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.comments__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.comments__submit {
  min-height: 46px;
  padding: 10px 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--comments-brand);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.comments__submit:hover {
  background: #0F1E3D;
}

.comments__submit[disabled] {
  opacity: .65;
  cursor: progress;
}

.comments__status {
  margin: 0;
  font-size: 15px;
  color: var(--comments-muted);
}

.comments__status--ok {
  color: var(--comments-ok);
  font-weight: 700;
}

.comments__status--error {
  color: var(--comments-error);
}

/* Lista */
.comments__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--comments-line);
  list-style: none;
}

.comment:last-child {
  border-bottom: 0;
}

.comment--new {
  animation: comment-in .4s ease-out;
}

.comment__avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: hsl(var(--hue, 220) 45% 32%);
  border-radius: 50%;
}

.comment__main {
  flex: 1;
  min-width: 0;
}

.comment__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 4px;
}

.comment__name {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.comment__time {
  font-size: 13px;
  color: var(--comments-muted);
}

.comment__body {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.comments__state {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--comments-muted);
}

.comments__more-btn {
  min-height: 46px;
  padding: 10px 22px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--comments-brand);
  background: #fff;
  border: 2px solid var(--comments-brand);
  border-radius: 4px;
  cursor: pointer;
}

.comments__retry {
  padding: 0;
  font: inherit;
  color: var(--comments-brand);
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}

@keyframes comment-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .comment--new { animation: none; }
}

@media (max-width: 575px) {
  .comments__form { margin-inline: -12px; padding: 14px 12px; border-radius: 0; }
  .comments__submit { width: 100%; }
  .comments__title { font-size: 22px; }
}

/* Página de regras (/comentarios) */
.comments-rules {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 60px;
  line-height: 1.65;
  color: #07171D;
}

.comments-rules h1 {
  margin: 0 0 14px;
  font-size: 34px;
  line-height: 1.2;
}

.comments-rules h2 {
  margin: 34px 0 10px;
  font-size: 22px;
}

.comments-rules p,
.comments-rules li {
  font-size: 18px;
}

.comments-rules ul {
  margin: 0 0 10px;
  padding-left: 22px;
}

.comments-rules li {
  list-style: disc;
  margin-bottom: 6px;
}

.comments-rules__lead {
  font-size: 20px;
  color: #3F4A53;
}

.comments-rules__notice {
  margin: 26px 0 0;
  padding: 16px 18px;
  background: #F0EEEF;
  border-left: 4px solid #0F1E3D;
}

.comments-rules__notice p {
  margin: 0;
}

.comments-rules a {
  color: #2D417E;
  text-decoration: underline;
}
