/**
 * Comments Styles
 * Comment list, comment form, and replies
 */

/* Comments Area */
.hvn-theme-comments-area {
  margin-top: var(--hvn-theme-space-2xl);
  background: var(--hvn-theme-color-white);
  border-radius: var(--hvn-theme-border-radius-lg);
  padding: var(--hvn-theme-space-xl);
  box-shadow: var(--hvn-theme-shadow-card);
}

/* Comments Title */
.hvn-theme-comments-title {
  font-size: var(--hvn-theme-font-size-2xl);
  margin-bottom: var(--hvn-theme-space-lg);
  padding-bottom: var(--hvn-theme-space-md);
  border-bottom: 2px solid var(--hvn-theme-border-color);
}

/* Comment List */
.hvn-theme-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hvn-theme-comment-list .comment {
  margin-bottom: var(--hvn-theme-space-lg);
  padding-bottom: var(--hvn-theme-space-lg);
  border-bottom: 1px solid var(--hvn-theme-border-color-light);
}

.hvn-theme-comment-list .comment:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Comment Body */
.hvn-theme-comment-body {
  display: flex;
  gap: var(--hvn-theme-space-lg);
}

/* Comment Avatar */
.hvn-theme-comment-avatar {
  flex-shrink: 0;
}

.hvn-theme-comment-avatar img {
  width: 60px;
  height: 60px;
  border-radius: var(--hvn-theme-border-radius-full);
}

/* Comment Content */
.hvn-theme-comment-content {
  flex: 1;
}

/* Comment Meta */
.hvn-theme-comment-meta {
  margin-bottom: var(--hvn-theme-space-sm);
}

.hvn-theme-comment-author {
  font-weight: var(--hvn-theme-font-weight-semibold);
  color: var(--hvn-theme-text-primary);
  text-decoration: none;
}

.hvn-theme-comment-author:hover,
.hvn-theme-comment-author:focus {
  color: var(--hvn-theme-brand-primary);
}

.hvn-theme-comment-date {
  font-size: var(--hvn-theme-font-size-xs);
  color: var(--hvn-theme-text-muted);
  margin-left: var(--hvn-theme-space-sm);
}

/* Comment Text */
.hvn-theme-comment-text {
  color: var(--hvn-theme-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--hvn-theme-space-sm);
}

/* Comment Reply Link */
.hvn-theme-comment-reply-link {
  display: inline-block;
  font-size: var(--hvn-theme-font-size-sm);
  color: var(--hvn-theme-brand-primary);
  text-decoration: none;
  font-weight: var(--hvn-theme-font-weight-medium);
}

.hvn-theme-comment-reply-link:hover,
.hvn-theme-comment-reply-link:focus {
  text-decoration: underline;
}

/* Nested Comments */
.hvn-theme-comment-list .children {
  list-style: none;
  margin: var(--hvn-theme-space-lg) 0 0 var(--hvn-theme-space-xl);
  padding: 0;
}

/* By Post Author Comment */
.hvn-theme-comment-list .bypostauthor > .comment-body {
  background: rgba(108, 96, 254, 0.05);
  padding: var(--hvn-theme-space-lg);
  border-radius: var(--hvn-theme-border-radius-lg);
}

.hvn-theme-comment-list .bypostauthor .hvn-theme-comment-author::after {
  content: "Author";
  display: inline-block;
  background: var(--hvn-theme-brand-primary);
  color: var(--hvn-theme-color-white);
  font-size: var(--hvn-theme-font-size-xs);
  padding: 0.125rem 0.5rem;
  border-radius: var(--hvn-theme-border-radius-full);
  margin-left: var(--hvn-theme-space-sm);
}

/* Comment Navigation */
.hvn-theme-comment-navigation {
  display: flex;
  justify-content: space-between;
  margin: var(--hvn-theme-space-lg) 0;
}

/* No Comments */
.hvn-theme-no-comments {
  color: var(--hvn-theme-text-muted);
  font-style: italic;
  text-align: center;
  padding: var(--hvn-theme-space-xl);
}

/* Comment Form */
.hvn-theme-comment-respond {
  margin-top: var(--hvn-theme-space-xl);
  padding-top: var(--hvn-theme-space-xl);
  border-top: 1px solid var(--hvn-theme-border-color);
}

.hvn-theme-reply-title {
  font-size: var(--hvn-theme-font-size-xl);
  margin-bottom: var(--hvn-theme-space-lg);
}

.hvn-theme-comment-form {
  display: grid;
  gap: var(--hvn-theme-space-lg);
}

.hvn-theme-comment-form .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--hvn-theme-space-xs);
}

.hvn-theme-comment-form label {
  font-weight: var(--hvn-theme-font-weight-medium);
  color: var(--hvn-theme-text-primary);
}

.hvn-theme-comment-form input[type="text"],
.hvn-theme-comment-form input[type="email"],
.hvn-theme-comment-form input[type="url"],
.hvn-theme-comment-form textarea {
  width: 100%;
  padding: var(--hvn-theme-input-padding);
  border: 1px solid var(--hvn-theme-input-border);
  border-radius: var(--hvn-theme-input-radius);
  transition: all var(--hvn-theme-transition-base);
}

.hvn-theme-comment-form input:focus,
.hvn-theme-comment-form textarea:focus {
  outline: none;
  border-color: var(--hvn-theme-input-border-focus);
  box-shadow: 0 0 0 3px rgba(108, 96, 254, 0.1);
}

.hvn-theme-comment-form .required {
  color: var(--hvn-theme-brand-error);
}

.hvn-theme-form-submit {
  margin-top: var(--hvn-theme-space-sm);
}

/* Responsive Comments */
@media (max-width: 768px) {
  .hvn-theme-comments-area {
    padding: var(--hvn-theme-space-lg);
  }
  
  .hvn-theme-comment-body {
    flex-direction: column;
    gap: var(--hvn-theme-space-sm);
  }
  
  .hvn-theme-comment-avatar img {
    width: 40px;
    height: 40px;
  }
  
  .hvn-theme-comment-list .children {
    margin-left: var(--hvn-theme-space-md);
  }
}