/* Corrections Link + Modal — blog post factual-correction reporter
   Scoped under .hg-corr- prefix. Mobile-first. px font sizes. */

/* ── Trigger link (injected near author byline / bottom of post) ── */
.hg-corr-link-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 10px;
  padding: 12px 16px;
  max-width: 640px;
  background: #f7f8f9;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  font-size: 15px;
  color: #555;
  text-align: center;
  line-height: 1.4;
  box-sizing: border-box;
}
.hg-corr-link-wrap .hg-corr-icon {
  font-size: 18px;
  color: #2d6a4f;
  flex-shrink: 0;
}
.hg-corr-link-wrap .hg-corr-link {
  color: #1d9771;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-family: inherit;
}
.hg-corr-link-wrap .hg-corr-link:hover { color: #146b52; }

/* ── Modal overlay ── */
.hg-corr-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.hg-corr-modal.is-visible { display: flex; }
.hg-corr-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 25, 0.55);
}
.hg-corr-modal-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 24px 22px 20px;
  box-sizing: border-box;
}

/* ── Header ── */
.hg-corr-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.hg-corr-modal-header h4 {
  margin: 0;
  font-size: 22px;
  color: #1b4332;
  line-height: 1.25;
}
.hg-corr-modal-close {
  background: transparent;
  border: 0;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}
.hg-corr-modal-close:hover { color: #000; }

.hg-corr-modal-intro {
  font-size: 15px;
  color: #555;
  margin: 0 0 16px;
  line-height: 1.45;
}
.hg-corr-modal-intro strong { color: #1b4332; }

/* ── Form fields ── */
.hg-corr-field { margin-bottom: 14px; }
.hg-corr-field label {
  display: block;
  font-size: 14px;
  color: #333;
  font-weight: 600;
  margin-bottom: 6px;
}
.hg-corr-field label .hg-corr-optional {
  color: #888;
  font-weight: 400;
  font-size: 13px;
}
.hg-corr-textarea,
.hg-corr-email {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 16px;
  font-family: inherit;
  color: #222;
  background: #fff;
}
.hg-corr-textarea:focus,
.hg-corr-email:focus {
  border-color: #1d9771;
  outline: none;
  box-shadow: 0 0 0 2px rgba(29, 151, 113, 0.15);
}
.hg-corr-textarea { min-height: 120px; resize: vertical; }
.hg-corr-char-count {
  font-size: 12px;
  color: #888;
  text-align: right;
  margin-top: 4px;
}

/* ── Buttons ── */
.hg-corr-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  flex-wrap: wrap;
}
.hg-corr-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.hg-corr-cancel {
  background: #eee;
  color: #333;
}
.hg-corr-cancel:hover { background: #ddd; }
.hg-corr-submit {
  background: #1d9771;
  color: #fff;
}
.hg-corr-submit:hover { background: #146b52; }
.hg-corr-submit[disabled] {
  background: #aaa;
  cursor: not-allowed;
}

/* ── Success / error states ── */
.hg-corr-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
}
.hg-corr-status.is-visible { display: block; }
.hg-corr-status.is-success {
  background: #e8f5e9;
  color: #1b4332;
  border: 1px solid #a8d5b7;
}
.hg-corr-status.is-error {
  background: #fde8e8;
  color: #8a1c1c;
  border: 1px solid #f1a6a6;
}

/* ── Privacy note ── */
.hg-corr-privacy {
  font-size: 12px;
  color: #888;
  margin: 8px 0 0;
  line-height: 1.4;
}

/* ── Mobile tweaks ── */
@media (max-width: 480px) {
  .hg-corr-modal-card { padding: 20px 16px 16px; }
  .hg-corr-modal-header h4 { font-size: 19px; }
  .hg-corr-link-wrap { font-size: 14px; padding: 10px 12px; }
  .hg-corr-actions { justify-content: stretch; }
  .hg-corr-btn { flex: 1; }
}

/* ── Print: hide ── */
@media print {
  .hg-corr-link-wrap, .hg-corr-modal { display: none !important; }
}
