/**
 * THE CONNECTED HAVEN - COMMENTS STYLES
 *
 * Styles for comment section
 *
 * @package Blocksy_Child_TCH
 * @version 1.0.0
 */

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */

.tch-comments {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--tch-light);
}

.tch-comments__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   COMMENT LIST
   ========================================================================== */

.tch-comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-2xl);
}

.tch-comment {
  margin-bottom: var(--space-lg);
}

.tch-comment .children {
  list-style: none;
  padding-left: var(--space-2xl);
  margin-top: var(--space-lg);
  border-left: 2px solid var(--tch-light);
}

.tch-comment__body {
  padding: var(--space-lg);
  background: var(--tch-lighter);
  border-radius: var(--radius-lg);
}

.tch-comment__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.tch-comment__avatar img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.tch-comment__meta {
  display: flex;
  flex-direction: column;
}

.tch-comment__author {
  font-weight: 600;
  color: var(--tch-dark);
}

.tch-comment__author a {
  color: var(--tch-dark);
  text-decoration: none;
}

.tch-comment__author a:hover {
  color: var(--tch-primary);
}

.tch-comment__date {
  font-size: 0.8125rem;
  color: var(--tch-muted);
}

.tch-comment__moderation {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.tch-comment__content {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--tch-text);
}

.tch-comment__content p:last-child {
  margin-bottom: 0;
}

.tch-comment__footer {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tch-comment__reply a,
.tch-comment__edit a {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tch-primary);
  text-decoration: none;
}

.tch-comment__reply a:hover,
.tch-comment__edit a:hover {
  color: var(--tch-primary-dark);
}

/* ==========================================================================
   COMMENT NAVIGATION
   ========================================================================== */

.tch-comments-navigation {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2xl);
}

.tch-comments-nav__prev a,
.tch-comments-nav__next a {
  color: var(--tch-primary);
  text-decoration: none;
  font-weight: 500;
}

.tch-comments-nav__prev a:hover,
.tch-comments-nav__next a:hover {
  color: var(--tch-primary-dark);
}

/* ==========================================================================
   COMMENTS CLOSED
   ========================================================================== */

.tch-comments-closed {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  background: var(--tch-lighter);
  border-radius: var(--radius-lg);
  color: var(--tch-muted);
  margin-bottom: var(--space-2xl);
}

/* ==========================================================================
   COMMENT FORM
   ========================================================================== */

.tch-comment-form {
  background: var(--tch-lighter);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
}

.tch-comment-form__title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tch-dark);
  margin-bottom: var(--space-md);
}

.tch-comment-form__icon {
  color: var(--tch-primary);
}

.tch-cancel-reply {
  font-size: 0.875rem;
  font-weight: normal;
}

.tch-cancel-reply a {
  color: var(--tch-muted);
  text-decoration: none;
}

.tch-cancel-reply a:hover {
  color: var(--tch-primary);
}

.tch-comment-form__notes {
  font-size: 0.875rem;
  color: var(--tch-muted);
  margin-bottom: var(--space-lg);
}

.tch-comment-form__notes .required {
  color: #ef4444;
}

.tch-comment-form__field {
  margin-bottom: var(--space-lg);
}

.tch-comment-form__field label {
  display: block;
  font-weight: 600;
  color: var(--tch-dark);
  margin-bottom: var(--space-sm);
  font-size: 0.9375rem;
}

.tch-comment-form__field label .required {
  color: #ef4444;
}

.tch-comment-form__field input,
.tch-comment-form__field textarea {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--tch-light);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--tch-white);
  transition: all var(--transition-base);
}

.tch-comment-form__field input:focus,
.tch-comment-form__field textarea:focus {
  border-color: var(--tch-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tch-comment-form__field input::placeholder,
.tch-comment-form__field textarea::placeholder {
  color: var(--tch-muted);
}

.tch-comment-form__field textarea {
  resize: vertical;
  min-height: 150px;
}

/* Author fields in row on desktop */
@media (min-width: 768px) {
  .comment-form-author,
  .comment-form-email,
  .comment-form-url,
  .tch-comment-form__field--author,
  .tch-comment-form__field--email,
  .tch-comment-form__field--url {
    display: inline-block;
    width: calc(33.333% - 1rem);
    margin-right: var(--space-md);
    vertical-align: top;
  }

  .tch-comment-form__field--url {
    margin-right: 0;
  }
}

.tch-comment-form__submit {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tch-comment-form__submit .tch-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 640px) {
  .tch-comment .children {
    padding-left: var(--space-md);
  }

  .tch-comment__body {
    padding: var(--space-md);
  }

  .tch-comment__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .tch-comment-form {
    padding: var(--space-lg);
  }
}