/* ==========================================================================
   Nostr Comments Component Styles
   ========================================================================== */

#nostr-comments {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(140, 140, 140, 0.25);
  font-family: inherit;
  color: inherit;
}

.nc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.nc-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nc-header .nc-count {
  font-size: 0.875rem;
  opacity: 0.7;
  font-weight: normal;
}

/* --------------------------------------------------------------------------
   Reply Box & Authentication
   -------------------------------------------------------------------------- */
.nc-reply-box {
  background: rgba(140, 140, 140, 0.05);
  border: 1px solid rgba(140, 140, 140, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

.nc-reply-box:focus-within {
  border-color: rgba(140, 140, 140, 0.4);
}

.nc-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.nc-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nc-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(140, 140, 140, 0.2);
}

.nc-user-name {
  font-weight: 600;
}

.nc-user-method {
  font-size: 0.75rem;
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  background: rgba(140, 140, 140, 0.15);
  border-radius: 4px;
}

.nc-btn-logout {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
}

.nc-btn-logout:hover {
  opacity: 1;
}

/* Auth Selection Tabs */
.nc-auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(140, 140, 140, 0.15);
  padding-bottom: 0.5rem;
}

.nc-auth-tab {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.6;
  font-size: 0.85rem;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.nc-auth-tab:hover {
  opacity: 0.9;
  background: rgba(140, 140, 140, 0.1);
}

.nc-auth-tab.active {
  opacity: 1;
  font-weight: 600;
  background: rgba(140, 140, 140, 0.15);
}

.nc-auth-panel {
  display: none;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.nc-auth-panel.active {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nc-auth-row {
  display: flex;
  gap: 0.5rem;
}

.nc-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(140, 140, 140, 0.25);
  border-radius: 6px;
  color: inherit;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-family: inherit;
}

html.dark .nc-input {
  background: rgba(0, 0, 0, 0.25);
}

.nc-input:focus {
  outline: none;
  border-color: rgba(140, 140, 140, 0.5);
}

.nc-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  background: transparent;
  border: 1px solid rgba(140, 140, 140, 0.2);
  border-radius: 6px;
  color: inherit;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
}

.nc-textarea:focus {
  outline: none;
  border-color: rgba(140, 140, 140, 0.5);
}

.nc-reply-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.nc-status {
  font-size: 0.8rem;
  opacity: 0.7;
}

.nc-status.error {
  color: #ef4444;
  opacity: 1;
}

.nc-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nc-btn {
  background: rgba(140, 140, 140, 0.15);
  border: 1px solid rgba(140, 140, 140, 0.25);
  border-radius: 6px;
  color: inherit;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nc-btn:hover:not(:disabled) {
  background: rgba(140, 140, 140, 0.25);
}

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

.nc-btn-primary {
  background: #3b82f6;
  border-color: #2563eb;
  color: #ffffff;
}

.nc-btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.nc-btn-sm {
  padding: 3px 8px;
  font-size: 0.775rem;
}

/* --------------------------------------------------------------------------
   Comment List & Threading
   -------------------------------------------------------------------------- */
.nc-thread-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nc-comment-item {
  position: relative;
}

.nc-comment-card {
  background: rgba(140, 140, 140, 0.04);
  border: 1px solid rgba(140, 140, 140, 0.15);
  border-radius: 8px;
  padding: 0.875rem 1rem;
}

.nc-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.nc-comment-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nc-comment-author-name {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.nc-comment-author-name:hover {
  text-decoration: underline;
}

.nc-nip05 {
  font-size: 0.75rem;
  opacity: 0.6;
}

.nc-comment-date {
  font-size: 0.75rem;
  opacity: 0.6;
}

.nc-comment-body {
  font-size: 0.95rem;
  line-height: 1.55;
  word-break: break-word;
}

.nc-comment-body p {
  margin: 0.4rem 0;
}

.nc-comment-body p:first-child {
  margin-top: 0;
}

.nc-comment-body p:last-child {
  margin-bottom: 0;
}

.nc-comment-body a {
  color: #3b82f6;
  text-decoration: underline;
}

.nc-comment-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.nc-btn-reply {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.nc-btn-reply:hover {
  opacity: 1;
  background: rgba(140, 140, 140, 0.1);
}

/* Nested replies */
.nc-replies-container {
  margin-left: 1.25rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(140, 140, 140, 0.2);
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nc-loading, .nc-empty {
  text-align: center;
  padding: 2rem 1rem;
  opacity: 0.6;
  font-size: 0.9rem;
}
