/* ── Leave With Dad — Comment Widget ─────────────────────────────── */
:root {
  --lwd-bg:           #F5F0E8;
  --lwd-primary:      #2C3E35;
  --lwd-nav:          #1e2e27;
  --lwd-accent:       #C4622D;
  --lwd-muted:        #8aaa97;
  --lwd-white:        #ffffff;
  --lwd-font-display: 'Playfair Display', serif;
  --lwd-font-body:    'Inter', sans-serif;
  --lwd-radius:       8px;
  --lwd-shadow:       0 1px 3px rgba(0,0,0,0.08);
}

#leavewithdad-comments {
  font-family: var(--lwd-font-body);
  color: var(--lwd-primary);
  max-width: 720px;
  margin: 16px auto 0;
  padding: 0 16px 48px;
}

/* ── Section header ───────────────────────────────────────────────── */
.lwd-section-title {
  font-family: var(--lwd-font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--lwd-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

/* ── Page reaction bar ────────────────────────────────────────────── */
.lwd-page-reaction {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--lwd-white);
  border-radius: var(--lwd-radius);
  box-shadow: var(--lwd-shadow);
  padding: 14px 18px;
  margin-bottom: 28px;
}

.lwd-page-reaction-label {
  flex: 1;
  font-size: 14px;
  color: var(--lwd-primary);
}

.lwd-page-reaction-label strong {
  font-weight: 600;
}

.lwd-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lwd-bg);
  border: 1.5px solid var(--lwd-muted);
  color: var(--lwd-primary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 14px;
  font-family: var(--lwd-font-body);
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}

.lwd-like-btn:hover {
  border-color: var(--lwd-accent);
  color: var(--lwd-accent);
}

.lwd-like-btn.lwd-liked {
  background: var(--lwd-accent);
  border-color: var(--lwd-accent);
  color: var(--lwd-white);
}

/* ── Auth bar ─────────────────────────────────────────────────────── */
.lwd-auth-bar {
  background: var(--lwd-white);
  border-radius: var(--lwd-radius);
  box-shadow: var(--lwd-shadow);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.lwd-auth-prompt {
  font-size: 13px;
  color: var(--lwd-muted);
  margin-bottom: 12px;
}

.lwd-auth-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lwd-oauth-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--lwd-radius);
  font-size: 14px;
  font-family: var(--lwd-font-body);
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease;
}

.lwd-oauth-btn:hover { opacity: 0.88; }

.lwd-oauth-btn--google {
  background: var(--lwd-accent);
  color: var(--lwd-white);
}

.lwd-oauth-btn--facebook {
  background: #1877F2;
  color: var(--lwd-white);
}

.lwd-oauth-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Signed-in user row */
.lwd-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lwd-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--lwd-muted);
}

.lwd-user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lwd-accent);
  color: var(--lwd-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.lwd-user-name {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
}

.lwd-signout-btn {
  background: none;
  border: 1px solid var(--lwd-muted);
  color: var(--lwd-muted);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--lwd-font-body);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lwd-signout-btn:hover {
  border-color: var(--lwd-accent);
  color: var(--lwd-accent);
}

/* ── Comment composer ─────────────────────────────────────────────── */
.lwd-composer {
  background: var(--lwd-white);
  border-radius: var(--lwd-radius);
  box-shadow: var(--lwd-shadow);
  padding: 16px 18px;
  margin-bottom: 28px;
}

.lwd-composer textarea {
  width: 100%;
  min-height: 88px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--lwd-font-body);
  font-size: 14px;
  color: var(--lwd-primary);
  background: var(--lwd-bg);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
  line-height: 1.5;
}

.lwd-composer textarea:focus {
  border-color: var(--lwd-primary);
}

.lwd-composer textarea::placeholder {
  color: var(--lwd-muted);
  font-style: italic;
}

/* honeypot */
.lwd-hp { display: none !important; }

.lwd-composer-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.lwd-submit-btn {
  background: var(--lwd-accent);
  color: var(--lwd-white);
  border: none;
  border-radius: var(--lwd-radius);
  padding: 9px 22px;
  font-family: var(--lwd-font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.lwd-submit-btn:hover { opacity: 0.88; }
.lwd-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.lwd-composer-error {
  font-size: 12px;
  color: var(--lwd-accent);
  margin-top: 6px;
}

/* ── Comment thread ───────────────────────────────────────────────── */
.lwd-thread {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.lwd-thread-empty {
  font-size: 14px;
  color: var(--lwd-muted);
  text-align: center;
  padding: 32px 0;
  font-style: italic;
}

.lwd-comment {
  background: var(--lwd-white);
  border-radius: var(--lwd-radius);
  box-shadow: var(--lwd-shadow);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.lwd-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.lwd-comment-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lwd-comment-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--lwd-primary);
}

.lwd-comment-time {
  font-size: 12px;
  color: var(--lwd-muted);
}

.lwd-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--lwd-muted);
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
  font-size: 16px;
}

.lwd-delete-btn:hover { color: #c0392b; }

.lwd-comment-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--lwd-primary);
  word-break: break-word;
  margin-bottom: 12px;
}

.lwd-comment-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--lwd-bg);
  padding-top: 10px;
}

.lwd-comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 13px;
  font-family: var(--lwd-font-body);
  color: var(--lwd-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lwd-comment-like-btn:hover {
  border-color: var(--lwd-accent);
  color: var(--lwd-accent);
}

.lwd-comment-like-btn.lwd-liked {
  background: var(--lwd-accent);
  border-color: var(--lwd-accent);
  color: var(--lwd-white);
}

/* ── Loading spinner ──────────────────────────────────────────────── */
.lwd-loading {
  text-align: center;
  padding: 32px 0;
  color: var(--lwd-muted);
  font-size: 14px;
}

.lwd-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--lwd-muted);
  border-top-color: var(--lwd-accent);
  border-radius: 50%;
  animation: lwd-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

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

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .lwd-auth-buttons { flex-direction: column; }
  .lwd-oauth-btn { width: 100%; justify-content: center; }
  .lwd-page-reaction { flex-direction: column; align-items: flex-start; gap: 8px; }
}
