/* Comment Box Styles */
.comment-box {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.comment-box h4 {
  color: var(--berry, #600329);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Comment Form */
.comment-form {
  background: #f8f9fa;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.comment-form .form-group {
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #333;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--berry, #600329);
  box-shadow: 0 0 0 2px rgba(96, 3, 41, 0.1);
}

.comment-form textarea {
  min-height: 100px;
  resize: vertical;
}

.comment-form button {
  background: var(--berry, #600329);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.comment-form button:hover {
  background: #7a0435;
}

.comment-form button:disabled {
  background: #999;
  cursor: not-allowed;
}

/* Comments List */
.comments-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comments-list .no-comments {
  color: #666;
  font-style: italic;
  padding: 1rem 0;
}

/* Individual Comment */
.comment-item {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  color: var(--berry, #600329);
}

.comment-date {
  font-size: 0.85rem;
  color: #888;
}

.comment-text {
  color: #333;
  line-height: 1.5;
  margin: 0;
}

/* Comment Actions */
.comment-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
}

.comment-actions button {
  background: none;
  border: none;
  color: #666;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.comment-actions button:hover {
  color: var(--berry, #600329);
}

.comment-actions .like-count {
  color: #888;
}

/* Comment Count Badge */
.comment-count {
  background: var(--blush, #f5e6eb);
  color: var(--berry, #600329);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* Reply Styles */
.comment-replies {
  margin-top: 1rem;
  margin-left: 1.5rem;
  padding-left: 1rem;
  border-left: 2px solid var(--blush, #f5e6eb);
}

.comment-reply {
  background: #fafafa;
  border-color: #e9ecef;
}

.comment-reply .comment-author {
  font-size: 0.95rem;
}

.comment-reply .comment-text {
  font-size: 0.95rem;
}

/* Reply Form */
.reply-form-container {
  margin-top: 0.75rem;
}

.reply-form {
  background: #f0f0f0;
  padding: 0.75rem;
  border-radius: 6px;
}

.reply-form-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.reply-form input[type="text"] {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

.reply-form input[type="text"]:first-child {
  max-width: 120px;
  flex: 0 0 auto;
}

.reply-form input[type="text"]:focus {
  outline: none;
  border-color: var(--berry, #600329);
}

.reply-form button {
  background: var(--berry, #600329);
  color: #fff;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
}

.reply-form button:hover {
  background: #7a0435;
}

.reply-form button[type="button"] {
  background: #999;
}

.reply-form button[type="button"]:hover {
  background: #777;
}

/* Responsive */
@media (max-width: 576px) {
  .comment-form {
    padding: 1rem;
  }
  
  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .comment-replies {
    margin-left: 0.75rem;
    padding-left: 0.75rem;
  }

  .reply-form-row {
    flex-wrap: wrap;
  }

  .reply-form input[type="text"]:first-child {
    max-width: none;
    flex: 1 1 100%;
  }

  .reply-form input[type="text"]:nth-child(2) {
    flex: 1 1 calc(100% - 90px);
  }
}

/* Hide comments when printing */
@media print {
  .comment-box {
    display: none !important;
  }
}
