/* Comments — game_tgn_0044 Atlas Desk */

.g44-comments-section {
  margin-top: 4px;
  padding: 18px 18px 20px;
  background: #fffdf8;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(28, 25, 23, 0.06);
  position: relative;
}

.g44-comments-section::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(90deg, #0f766e, transparent 85%);
  pointer-events: none;
}

.g44-comments-section > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1c1917;
  margin: 0 0 16px;
}

.g44-comments-section > h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(28, 25, 23, 0.12);
  min-width: 24px;
}

/* ——— Login prompt ——— */
.g44-comment-login-prompt {
  padding: 22px 18px;
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 4px;
  text-align: center;
  margin-bottom: 18px;
}

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

.g44-comment-login-prompt__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1c1917;
}

.g44-comment-login-prompt__text {
  margin: 0 0 14px;
  font-size: 0.875rem;
  color: #57534e;
  line-height: 1.5;
}

.g44-comment-login-prompt .g44-btn,
.g44-comment-login-prompt__btn {
  min-width: 140px;
  min-height: 42px;
}

.g44-comment-login-prompt__footer {
  margin: 14px 0 0;
  font-size: 0.8125rem;
  color: #57534e;
}

.g44-comment-login-prompt__footer a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.g44-comment-login-prompt__footer a:hover {
  filter: brightness(1.08);
}

/* ——— Compose form ——— */
.g44-comment-form {
  display: grid;
  gap: 12px;
  background: rgba(15, 118, 110, 0.12);
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 18px;
}

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

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

.g44-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: #ffffff;
  background: #0f766e;
  border: 2px solid rgba(15, 118, 110, 0.12);
}

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

.g44-comment-author {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #1c1917;
}

.g44-rating-input {
  display: flex;
  gap: 2px;
  margin-bottom: 0;
}

.g44-rating-star {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  color: #a8a29e;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.12s ease, transform 0.12s ease;
}

.g44-rating-star.active,
.g44-rating-star:hover {
  color: #b45309;
}

.g44-rating-star:hover {
  transform: scale(1.08);
}

.g44-comment-textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1c1917;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 4px;
  resize: vertical;
  outline: none;
  margin-bottom: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.g44-comment-textarea::placeholder {
  color: #57534e;
  opacity: 0.85;
}

.g44-comment-textarea:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.g44-btn-post-comment {
  justify-self: start;
  min-height: 42px;
  padding: 0 20px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #0f766e;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.g44-btn-post-comment:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ——— List ——— */
.g44-comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.g44-comment-item {
  display: flex;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 4px;
  transition: border-color 0.15s ease;
}

.g44-comment-item:hover {
  border-color: #0f766e;
}

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

.g44-comment-item .g44-comment-avatar {
  width: 38px;
  height: 38px;
  font-size: 0.85rem;
  margin-top: 2px;
}

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

.g44-comment-meta-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 6px;
}

.g44-comment-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: #1c1917;
}

.g44-comment-time {
  font-size: 0.75rem;
  color: #57534e;
}

.g44-comment-rating {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: auto;
  color: #b45309;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.g44-comment-star {
  color: #a8a29e;
  font-style: normal;
  line-height: 1;
}

.g44-comment-star.is-on {
  color: #b45309;
}

.g44-comment-rating .fa-star,
.g44-comment-rating .fa-star-o {
  font-style: normal;
  font-family: inherit;
}
.g44-comment-rating .fa-star::before { content: "★"; }
.g44-comment-rating .fa-star-o::before { content: "☆"; color: #a8a29e; }

.g44-comment-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #57534e;
  word-break: break-word;
}

/* ——— Empty / loading / actions ——— */
.g44-comments-empty {
  text-align: center;
  padding: 28px 16px;
  color: #57534e;
  background: rgba(15, 118, 110, 0.12);
  border: 1px dashed rgba(28, 25, 23, 0.12);
  border-radius: 4px;
}

.g44-comments-empty p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.g44-loading {
  text-align: center;
  padding: 1.5rem;
  color: #57534e;
}

.g44-loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(28, 25, 23, 0.12);
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: g44-detail-spin 0.7s linear infinite;
}

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

#commentsActions,
.g44-comment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.g44-btn-load-comments,
#commentsLoadMore.g44-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  min-height: 42px;
  margin: 0;
  padding: 0 22px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1c1917;
  background: #ffffff;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.g44-btn-load-comments--expand {
  min-width: 140px;
  gap: 8px;
}

.g44-btn-load-comments[hidden],
#commentsLoadMore[hidden],
.g44-comment-actions .g44-btn-load-comments[hidden] {
  display: none !important;
}

.g44-btn-load-comments:hover,
#commentsLoadMore.g44-btn:hover {
  color: #ffffff;
  background: #0f766e;
  border-color: #0f766e;
}

/* ——— Toast ——— */
.g44-toast {
  position: fixed;
  top: 20px;
  bottom: auto;
  left: 50%;
  right: auto;
  width: max-content;
  max-width: min(420px, 90vw);
  height: auto;
  transform: translateX(-50%) translateY(-120%);
  z-index: 40000;
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  border-radius: 4px;
  border: 1px solid transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.28s ease;
  pointer-events: none;
}

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

.g44-toast.success {
  color: #ffffff;
  background: #0f766e;
  border-color: #0f766e;
}

.g44-toast.error {
  color: #fecaca;
  background: #3f1515;
  border-color: #f87171;
}

.g44-toast.warning {
  color: #1c1400;
  background: #b45309;
  border-color: #b45309;
}

@media (max-width: 767px) {
  .g44-comments-section {
    padding: 16px 14px 18px;
  }

  .g44-comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
  }

  .g44-comment-item .g44-comment-avatar {
    width: 32px;
    height: 32px;
  }

  .g44-rating-star {
    width: 40px;
    height: 40px;
  }

  .g44-btn-post-comment {
    width: 100%;
    justify-self: stretch;
  }

  .g44-comment-rating {
    margin-left: 0;
    flex-basis: 100%;
  }

  .g44-toast {
    font-size: 0.8125rem;
    padding: 10px 16px;
  }
}
