/* Comments — news_tgn_0005 paper burgundy */

.n1-comments-title {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.3;
  color: #121212;
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: -0.01em;
}

.n1-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.n1-comments-section {
  margin: 1.5rem 0 2rem;
  padding: 1.5rem;
  background: #fdfcf8;
  color: #121212;
  border: 1px solid rgba(18,18,18,0.1);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.n1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 1.25rem;
  font: inherit;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.n1-btn-primary {
  color: #fff;
  background: #8b0000;
  border: 0;
}

.n1-btn-primary:hover {
  background: #6e0000;
  color: #fff;
}

.n1-btn-outline {
  color: #121212;
  background: transparent;
  border: 1px solid rgba(18,18,18,0.14);
}

.n1-btn-outline:hover {
  color: #8b0000;
  border-color: #8b0000;
}

.n1-comment-form {
  background: #f5f5f0;
  border: 1px solid rgba(18,18,18,0.12);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  border-top: 3px solid #8b0000;
}

.n1-comment-form-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.n1-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: #8b0000;
  border: 1px solid rgba(18,18,18,0.14);
}

.n1-comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.n1-comment-author {
  font-weight: 700;
  font-size: 0.95rem;
  color: #121212;
}

.n1-rating-input {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.n1-rating-star {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #c9c4b8;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.n1-rating-star.active,
.n1-rating-star:hover {
  color: #c9a227;
}

.n1-comment-textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  font: inherit;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #121212;
  background: #fff;
  border: 1px solid rgba(18,18,18,0.14);
  border-radius: 8px;
  resize: vertical;
  outline: none;
  margin: 0 0 12px;
  box-sizing: border-box;
}

.n1-comment-textarea::placeholder {
  color: #555;
  opacity: 1;
}

.n1-comment-textarea:focus {
  border-color: #8b0000;
  box-shadow: 0 0 0 3px rgba(139,0,0,0.18);
}

.n1-btn-post-comment {
  position: relative;
  border-radius: 8px;
}

.n1-btn-post-comment:disabled,
.n1-btn-post-comment.is-loading {
  cursor: not-allowed;
  opacity: 0.85;
  pointer-events: none;
}

.n1-btn-post-comment.is-loading {
  color: transparent !important;
}

.n1-btn-post-comment.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: n1-detail-spin 0.7s linear infinite;
}

.n1-comment-login-prompt {
  padding: 1.25rem 1rem;
  background: #f5f5f0;
  border: 1px solid rgba(18,18,18,0.12);
  border-radius: 8px;
  text-align: center;
  margin-bottom: 1.25rem;
  border-top: 3px solid #8b0000;
}

.n1-comment-login-prompt[hidden] {
  display: none !important;
}

.n1-comment-login-prompt__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: "Source Serif 4", Georgia, serif;
  color: #121212;
}

.n1-comment-login-prompt__footer {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: #555;
}

.n1-comment-login-prompt__footer a {
  color: #8b0000;
  font-weight: 700;
}

.n1-comment-form[hidden] {
  display: none !important;
}

.n1-comment-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.n1-comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(18,18,18,0.1);
}

.n1-comment-item:first-child {
  border-top: none;
}

.n1-comment-item--folded {
  display: none;
}

.n1-comment-meta {
  flex: 1;
  min-width: 0;
}

.n1-comment-meta-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.n1-comment-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #121212;
}

.n1-comment-time {
  font-size: 0.75rem;
  color: #555;
}

.n1-comment-rating {
  color: #c9a227;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
}

.n1-comment-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
  word-break: break-word;
}

.n1-comments-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  color: #555;
}

#commentsLoadMore {
  margin-top: 0.75rem;
}

#commentsLoadMore[hidden] {
  display: none !important;
}

.n1-loading {
  text-align: center;
  padding: 1.5rem;
  color: #555;
}

.n1-loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,255,255,0.35);
  border-top-color: #8b0000;
  border-radius: 50%;
  animation: n1-detail-spin 0.7s linear infinite;
}

@keyframes n1-detail-spin {
  to { transform: rotate(360deg); }
}

.n1-toast {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  width: max-content;
  max-width: min(420px, calc(100vw - 2rem));
  transform: translateX(-50%) translateY(-120%);
  z-index: 40000;
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
  box-sizing: border-box;
}

.n1-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.n1-toast.success {
  color: #166534;
  background: #ecfdf5;
  border-color: #86efac;
}

.n1-toast.error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fca5a5;
}

.n1-toast.warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fcd34d;
}

@media (max-width: 767px) {
  .n1-comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .n1-btn-post-comment {
    width: 100%;
  }

  .n1-toast {
    font-size: 0.8125rem;
    padding: 10px 16px;
    white-space: normal;
  }
}