/**
 * @file
 * Disqus Comments - CSS Styles
 */

/* Comments Section Container */
.disqus-comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.disqus-comments__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.disqus-comments__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 !important;
}

.disqus-comments__count {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Disqus Thread Container */
#disqus_thread {
  min-height: 200px;
}

/* Loading State */
.disqus-comments__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #6b7280;
}

.disqus-comments__loading::after {
  content: '';
  width: 24px;
  height: 24px;
  margin-left: 0.75rem;
  border: 2px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: disqus-spin 0.8s linear infinite;
}

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

/* Privacy Notice */
.disqus-comments__privacy {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: center;
}

.disqus-comments__privacy a {
  color: #3b82f6;
  text-decoration: none;
}

.disqus-comments__privacy a:hover {
  text-decoration: underline;
}

/* Powered By */
.disqus-comments__powered-by {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
}

.disqus-comments__powered-by a {
  color: #6b7280;
  text-decoration: none;
}

.disqus-comments__powered-by a:hover {
  color: #3b82f6;
}

/* Responsive */
@media (max-width: 640px) {
  .disqus-comments {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .disqus-comments__header {
    align-items: flex-start;
    gap: 0.5rem;
  }

  .disqus-comments__title {
    font-size: 1.25rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .disqus-comments {
    border-top-color: #374151;
  }

  .disqus-comments__title {
    color: #f3f4f6;
  }

  .disqus-comments__count {
    color: #9ca3af;
  }

  .disqus-comments__privacy {
    background: #1f2937;
    color: #9ca3af;
  }

  .disqus-comments__loading {
    color: #9ca3af;
  }
}

#disqus_thread {
  display: block !important;
  visibility: visible !important;
  background: #fff !important;
  color: #111 !important;
  min-height: 200px;
}

#disqus_thread iframe {
  display: block !important;
  visibility: visible !important;
}

@media (prefers-color-scheme: dark) {
  #disqus_thread {
    background: #111 !important;
    color: #f3f4f6 !important;
  }
}
