/* Comments section (Supabase-backed). Mirrors the theme's Open Sans / #0274be. */

#comments {
  margin: 40px 0 20px;
  font-family: "Open Sans", sans-serif;
  color: #3a3a3a;
}

#comments .comments-title {
  font-size: 1.4em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5;
}

#comments .comments-status {
  color: #777;
  font-size: 0.9em;
}

/* --- sign-in prompt --- */

.comment-signin {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 24px;
}

.comment-signin p {
  margin: 0 0 10px;
  font-size: 0.95em;
}

/* Brand-standard OAuth buttons: GitHub dark, Google white-on-border. */

.comment-oauth {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  margin: 0 8px 8px 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.15px;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.comment-oauth-icon { flex: none; display: block; }

/* GitHub — dark button, white Octocat. */
.comment-oauth-github {
  background: #24292f;
  color: #fff;
  border: 1px solid #24292f;
  border-radius: 6px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.comment-oauth-github:hover { background: #32383f; border-color: #32383f; }
.comment-oauth-github:active { background: #1c2128; }

/* Google — white button, grey border, 4-colour G. */
.comment-oauth-google {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.comment-oauth-google:hover {
  background: #f8faff;
  border-color: #d2e3fc;
  box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
}

.comment-oauth-google:active { background: #f1f3f4; }

.comment-oauth:focus-visible { outline: 2px solid #0274be; outline-offset: 2px; }

/* --- comment form --- */

.comment-form {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 24px;
}

.comment-form-who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9em;
  margin-bottom: 10px;
}

#comment-replying {
  font-size: 0.85em;
  color: #777;
  margin-bottom: 8px;
}

.comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.95em;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  resize: vertical;
}

.comment-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.comment-submit {
  background: #0274be;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.9em;
  cursor: pointer;
}

.comment-submit:hover { background: #025c96; }
.comment-submit:disabled { background: #9bbdd6; cursor: default; }

/* --- comment list --- */

.comment-thread { margin-bottom: 20px; }

.comment {
  padding: 12px 0;
  border-top: 1px solid #eee;
}

.comment-reply {
  margin-left: 32px;
  border-top: 1px dashed #eee;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.comment-avatar-blank { background: #d8d8d8; display: inline-block; }

.comment-author { font-weight: 600; font-size: 0.92em; }

.comment-date { color: #999; font-size: 0.8em; }

.comment-body {
  font-size: 0.95em;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-actions { margin-top: 6px; }

.comment-link {
  background: none;
  border: none;
  padding: 0;
  margin-right: 12px;
  color: #0274be;
  font-family: inherit;
  font-size: 0.8em;
  cursor: pointer;
}

.comment-link:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .comment-reply { margin-left: 16px; }
}
