/*--------------------------------------------------------------
# Citation Generator page
# Shared primitives — .option-rows / .option-row / .option-row-label
# / .icon-tab-grid / .icon-tab / .action-row — live in style.css.
# This file only contains citation-specific styles: the form
# validation tweak, the formatted output card, the copy/autofill
# buttons, and a couple of mobile overrides for the output.
--------------------------------------------------------------*/
.citation-section { padding: 60px 0; }

/* ── Form ────────────────────────────────────────────────────────────────── */
.cite-form .calc-grid {
  margin-bottom: 6px;
}
.calc-field.is-invalid .input-unit-wrap {
  border-color: #dc3545;
}
.calc-field.is-invalid .input-unit-wrap:focus-within {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}
.field-help {
  font-size: 12px;
  color: #adb5bd;
  margin-top: 2px;
}
.field-required-mark {
  color: #dc3545;
  margin-left: 3px;
}

/* ── Output card ─────────────────────────────────────────────────────────── */
.cite-output-card {
  margin-top: 24px;
}
.cite-output-body {
  padding: 22px 28px 26px;
}
.cite-output-meta {
  font-size: 12px;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.cite-output {
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #45505b;
  background: #f8fafd;
  border: 1px solid #e4eaf1;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0;
  /* Hanging indent — Chicago/MLA/APA/Harvard all use this for bibliographies */
  padding-left: 36px;
  text-indent: -20px;
  word-break: break-word;
}
.cite-output em { font-style: italic; }
.cite-output.is-intext {
  text-indent: 0;
  padding-left: 20px;
  font-size: 16px;
  text-align: center;
}

.cite-copy-btn.copied {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
}

/* ── Autofill button (sits inside .input-unit-wrap on URL fields) ─────────── */
.cite-autofill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 15px;
  background: #e8f0fb;
  color: #0563bb;
  border: none;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  letter-spacing: 0.2px;
}
.cite-autofill-btn:hover:not(:disabled) {
  background: #0563bb;
  color: #fff;
}
.cite-autofill-btn:disabled { opacity: 0.7; cursor: progress; }
.cite-autofill-btn i { font-size: 15px; }
.cite-autofill-btn .bx-spin { animation: cite-spin 0.8s linear infinite; }
@keyframes cite-spin { to { transform: rotate(360deg); } }

/* ── Responsive (output card only — primitives ship their own) ──────────── */
@media (max-width: 768px) {
  .cite-output {
    padding-left: 24px;
    text-indent: -14px;
    font-size: 14px;
  }
}
