/* ============================================================================
   BLOG COMMENTS STYLES
   ============================================================================ */

.blog-comments-section {
  margin-top: 2rem;
  padding: 2rem 1rem;
  border-top: 2px solid var(--primary-color, #00B5B8);
  background: var(--bg-light, #ffffff);
}

.blog-comments-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
}

.blog-comments-container h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-color, #333333);
  position: relative;
  padding-bottom: 15px;
}

.blog-comments-container h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color, #00B5B8), var(--secondary-color, #0088CC));
  border-radius: 3px;
}

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

.comment-form-area {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color, #333333);
  font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color, #333333);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color, #00B5B8);
  box-shadow: 0 0 0 3px rgba(0, 181, 184, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group small {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

#char-count {
  text-align: right;
  font-size: 0.85rem;
  color: #666;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-color, #00B5B8);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #008A8D;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 181, 184, 0.3);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  padding: 1rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  display: none;
}

.form-message:not(:empty) {
  display: block;
}

.form-message.success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.form-message.error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* ============================================================================
   COMMENTS LIST STYLES
   ============================================================================ */

.comments-list-area {
  margin-top: 2rem;
}

.loading {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 0.95rem;
}

.loading.error {
  color: #c62828;
  background: #ffebee;
  border-radius: 4px;
  border: 1px solid #ef9a9a;
}

.no-comments {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 0.95rem;
  font-style: italic;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ============================================================================
   COMMENT STYLES
   ============================================================================ */

.comment {
  padding: 1rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.comment:hover {
  border-color: var(--primary-color, #00B5B8);
  box-shadow: 0 2px 4px rgba(0, 181, 184, 0.1);
}

.comment-root {
  margin-left: 0;
}

.comment-reply {
  margin-left: 1rem;
  border-left: 3px solid var(--primary-color, #00B5B8);
  background: white;
}

.comment-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 600;
  color: var(--text-color, #333333);
  font-size: 0.95rem;
}

.comment-date {
  font-size: 0.85rem;
  color: #666;
}

.comment-body {
  color: var(--text-color, #333333);
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.comment-replies {
  margin-top: 1rem;
  margin-left: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================================================================
   LIKES BUTTON STYLES
   ============================================================================ */

.likes-button-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.engagement-section {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 1rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.engagement-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.share-buttons-group {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: var(--light-accent, #f0f9fa);
  border: none;
  border-radius: var(--border-radius, 4px);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--primary-dark, #008080);
  text-decoration: none;
}

.share-button:hover {
  background: var(--primary-color, #00B5B8);
  color: white;
  transform: translateY(-2px);
}

.share-button svg {
  width: 20px;
  height: 20px;
}

.share-button span {
  display: none;
}

.engagement-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color, #333333);
}

.likes-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: var(--light-accent, #f0f9fa);
  border: none;
  border-radius: var(--border-radius, 4px);
  cursor: pointer;
  transition: all 0.2s;
  color: var(--primary-dark, #008080);
  text-decoration: none;
}

.likes-button:hover:not(:disabled) {
  background: var(--primary-color, #00B5B8);
  color: white;
  transform: translateY(-2px);
}

.likes-button.liked {
  background: var(--primary-color, #00B5B8);
  color: white;
}

.likes-button.liked:hover:not(:disabled) {
  background: #008A8D;
}

.likes-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.likes-icon {
  font-size: 1.1em;
  display: inline-block;
  transition: transform 0.2s;
  width: 20px;
  height: 20px;
  color: var(--primary-dark, #008080);
}

.likes-button .likes-count {
  display: none;
}

@keyframes like-pulse {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.3);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.likes-count {
  min-width: 1.5rem;
  text-align: center;
}

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

@media (max-width: 640px) {
  .blog-comments-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .comment-form-area {
    padding: 1rem;
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .comment-reply {
    margin-left: 0.5rem;
  }

  .comment-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .likes-button {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

.likes-button:focus-visible,
.btn:focus-visible,
.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: 2px solid var(--primary-color, #00B5B8);
  outline-offset: 2px;
}
