/* Comments — news_tgn_0001 */

.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: 0 0 2rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.n1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 1.25rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.n1-btn-primary {
  color: #0a0a0f;
  background: var(--accent-color, #f59e0b);
  border: 0;
}

.n1-btn-primary:hover {
  background: var(--accent-hover, #d97706);
  color: #0a0a0f;
}

.n1-btn-outline {
  color: #e2e8f0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.n1-btn-outline:hover {
  color: var(--accent-color, #f59e0b);
  border-color: var(--accent-color, #f59e0b);
}

.n1-comment-form {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent-color, #f59e0b);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

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

.n1-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #0a0a0f;
  background: var(--accent-color, #f59e0b);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

.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: #4b5563;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.n1-rating-star.active,
.n1-rating-star:hover {
  color: var(--accent-color, #f59e0b);
}

.n1-comment-textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #e2e8f0;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.5rem;
  resize: vertical;
  outline: none;
  margin: 0 0 12px;
  box-sizing: border-box;
}

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

.n1-comment-textarea:focus {
  border-color: var(--accent-color, #f59e0b);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

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

.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(10, 10, 15, 0.25);
  border-top-color: #0a0a0f;
  border-radius: 50%;
  animation: n1-detail-spin 0.7s linear infinite;
}

.n1-comment-login-prompt {
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--accent-color, #f59e0b);
  border-radius: 0.75rem;
  text-align: center;
  margin-bottom: 1.25rem;
}

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

.n1-comment-login-prompt__title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

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

.n1-comment-login-prompt__footer a {
  color: var(--accent-color, #f59e0b);
  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(255, 255, 255, 0.08);
}

.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: #fff;
}

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

.n1-comment-rating {
  color: var(--accent-color, #f59e0b);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
}

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

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

#commentsLoadMore {
  margin-top: 0.75rem;
}

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

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

.n1-loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent-color, #f59e0b);
  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;
  bottom: auto;
  left: 50%;
  right: auto;
  width: max-content;
  max-width: min(420px, calc(100vw - 2rem));
  height: auto;
  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: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  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: #86efac;
  background: rgba(22, 101, 52, 0.95);
  border-color: rgba(34, 197, 94, 0.45);
}

.n1-toast.error {
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.95);
  border-color: rgba(239, 68, 68, 0.45);
}

.n1-toast.warning {
  color: #fde68a;
  background: rgba(120, 53, 15, 0.95);
  border-color: rgba(245, 158, 11, 0.45);
}

@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;
  }
}

/* Light theme overrides for GeneratePress pages */
.comments-area .n1-comments-section {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 1.25rem;
}

.comments-area .n1-comments-title {
  margin: 0 0 1rem;
  color: inherit;
}

.comments-area .n1-btn-primary {
  color: #fff;
  background: #1e73be;
  border-radius: 4px;
}

.comments-area .n1-btn-primary:hover {
  background: #1665a8;
  color: #fff;
}

.comments-area .n1-btn-outline {
  color: #222;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.comments-area .n1-btn-outline:hover {
  color: #1e73be;
  border-color: #1e73be;
}

.comments-area .n1-comment-form {
  background: #f7f7f7;
  border: 1px solid #e2e2e2;
  border-left: 4px solid #1e73be;
  border-radius: 4px;
}

.comments-area .n1-comment-login-prompt {
  background: #f7f7f7;
  border: 1px solid #e2e2e2;
  border-left: 4px solid #1e73be;
  border-radius: 4px;
}

.comments-area .n1-comment-author,
.comments-area .n1-comment-name,
.comments-area .n1-comment-body {
  color: #222;
}

.comments-area .n1-comment-time,
.comments-area .n1-comments-empty,
.comments-area .n1-loading,
.comments-area .n1-comment-login-prompt__title,
.comments-area .n1-comment-login-prompt__footer {
  color: #666;
}

.comments-area .n1-comment-textarea {
  color: #222;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.comments-area .n1-comment-item {
  border-bottom: 1px solid #eee;
}

.comments-area .n1-comment-avatar {
  color: #fff;
  background: #1e73be;
  border: 0;
}

.comments-area .n1-rating-star.active,
.comments-area .n1-rating-star:hover,
.comments-area .n1-comment-rating {
  color: #1e73be;
}

.comments-area .n1-loading-spinner {
  border-color: rgba(30, 115, 190, 0.2);
  border-top-color: #1e73be;
}
