/*
Theme Name:   Rehub Child — payments.com.ua
Template:     rehub-theme
Description:  Child theme for payments.com.ua. Owns the comments rendering (server-side, schema.org/Comment, no Disqus iframe). Parent theme files remain untouched and upgrade-safe.
Version:      1.0.0
Text Domain:  rehub-payments
*/

/* ---------- Server-rendered comments block ---------- */
.pcc-comments {
  margin-top: 32px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #1f2937;
}
.pcc-comments h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #0f172a;
}
.pcc-comments .pcc-count {
  color: #64748b;
  font-weight: 400;
  font-size: 16px;
  margin-left: 6px;
}
.pcc-thread,
.pcc-thread ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.pcc-comment {
  position: relative;
  padding: 16px 0 16px 56px;
  border-top: 1px solid #e5e7eb;
}
.pcc-thread > .pcc-comment:first-child { border-top: none; }
.pcc-comment .pcc-avatar {
  position: absolute;
  left: 0;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  user-select: none;
  flex-shrink: 0;
}
.pcc-comment .pcc-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 6px;
}
.pcc-comment .pcc-author {
  font-weight: 600;
  color: #0f172a;
}
.pcc-comment .pcc-author a {
  color: inherit;
  text-decoration: none;
}
.pcc-comment .pcc-date {
  color: #94a3b8;
  font-size: 13px;
}
.pcc-comment .pcc-date a {
  color: inherit;
  text-decoration: none;
}
.pcc-comment .pcc-date a:hover { text-decoration: underline; }
.pcc-comment .pcc-in-reply {
  font-size: 12px;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px 8px;
}
.pcc-comment .pcc-body {
  font-size: 15px;
  line-height: 1.55;
  color: #1f2937;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.pcc-comment .pcc-body p { margin: 0 0 8px; }
.pcc-comment .pcc-body p:last-child { margin-bottom: 0; }
.pcc-comment .pcc-body a { color: #2563eb; }
.pcc-comment .pcc-body img { max-width: 100%; height: auto; border-radius: 6px; }
.pcc-comment .pcc-body blockquote {
  margin: 8px 0;
  padding: 4px 12px;
  border-left: 3px solid #cbd5e1;
  color: #475569;
  background: #f8fafc;
}
.pcc-comment .pcc-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  font-size: 13px;
}
.pcc-comment .pcc-reply-btn {
  background: none;
  border: none;
  color: #2563eb;
  padding: 0;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}
.pcc-comment .pcc-reply-btn:hover { text-decoration: underline; }
.pcc-comment.pcc-hidden-parent .pcc-author { color: #94a3b8; font-style: italic; }
.pcc-comment.pcc-hidden-parent .pcc-body { color: #94a3b8; font-style: italic; }

/* Nested replies — visual indentation, capped on mobile */
.pcc-replies {
  margin-top: 12px;
  padding-left: 0;
  border-left: 2px solid #e5e7eb;
}
.pcc-replies .pcc-comment {
  padding-left: 56px;
  margin-left: 16px;
}
@media (max-width: 640px) {
  .pcc-comment { padding-left: 48px; }
  .pcc-comment .pcc-avatar { width: 32px; height: 32px; font-size: 12px; }
  .pcc-replies .pcc-comment { margin-left: 8px; padding-left: 48px; }
  .pcc-replies .pcc-replies { margin-left: 0; padding-left: 8px; }
}

/* Show-more disclosure (no JS required; <details> native) */
.pcc-more {
  display: block;
  margin: 8px 0 4px;
}
.pcc-more > summary {
  list-style: none;
  cursor: pointer;
  color: #2563eb;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 0;
  user-select: none;
}
.pcc-more > summary::-webkit-details-marker { display: none; }
.pcc-more > summary::before {
  content: "▾ ";
  display: inline-block;
  transform: rotate(-90deg);
  margin-right: 4px;
  transition: transform 120ms;
}
.pcc-more[open] > summary::before { transform: rotate(0deg); }
.pcc-more > summary:hover { text-decoration: underline; }

/* "Show more root comments" — for very long pages, hide all after N */
.pcc-more-roots {
  text-align: center;
  margin: 24px 0 8px;
}
.pcc-more-roots > summary {
  display: inline-block;
  padding: 10px 20px;
  background: #f1f5f9;
  border-radius: 6px;
  color: #1e40af;
  cursor: pointer;
  font-weight: 500;
}
.pcc-more-roots[open] > summary { display: none; }

/* Empty state */
.pcc-empty {
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 8px;
}

/* Comment form placeholder (Phase 3c will populate) */
.pcc-form-area {
  margin-top: 32px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}
/* ---------- Form (Phase 3c) ---------- */
.pcc-form-area, .pcc-form {
  margin-top: 24px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
}
.pcc-form-area { color: #64748b; text-align: center; }
.pcc-form { text-align: left; color: #1f2937; }
.pcc-replies .pcc-form { background: #fff; }

.pcc-form-replying-to {
  font-size: 12px;
  color: #6366f1;
  margin-bottom: 8px;
  font-weight: 500;
}

.pcc-form-row { display: block; margin-bottom: 12px; }
.pcc-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) { .pcc-form-row-2 { grid-template-columns: 1fr; } }

.pcc-form label > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pcc-form input[type="text"],
.pcc-form input[type="email"],
.pcc-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.pcc-form input:focus,
.pcc-form textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.pcc-form textarea { resize: vertical; min-height: 80px; }

/* Honeypot is invisible to humans but boring to bots */
.pcc-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.pcc-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.pcc-submit-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms;
}
.pcc-submit-btn:hover { background: #1d4ed8; }
.pcc-submit-btn:disabled { background: #94a3b8; cursor: progress; }
.pcc-cancel-btn {
  background: transparent;
  color: #64748b;
  border: none;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
}
.pcc-cancel-btn:hover { color: #1f2937; }

.pcc-form-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}
.pcc-msg-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.pcc-msg-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.pcc-msg-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.pcc-published-banner {
  margin: 16px 0;
  padding: 12px 16px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-weight: 500;
  transition: opacity 600ms;
}
.pcc-banner-fade { opacity: 0; }

.pcc-turnstile-slot {
  margin: 12px 0 4px;
  min-height: 65px;
}
