/* -------------------------------------------------------------
 * LeafBrowser - Citation Generators (APA & MLA)
 * Modern SaaS UI Redesign
 * ------------------------------------------------------------- */

/* ── Format Badge ───────────────────────────────────────────── */
.leaf-cite-format-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: 9999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

/* ── Authors Builder Card ───────────────────────────────────── */
.leaf-cite-authors-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.leaf-cite-authors-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.leaf-cite-author-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: #64748b;
}

.leaf-cite-author-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.leaf-cite-author-row input {
  min-width: 140px;
}

.leaf-cite-add-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: rgba(16, 185, 129, 0.06);
  color: #059669;
  border: 1.5px dashed #a7f3d0;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.leaf-cite-add-author:hover {
  background: #ecfdf5;
  border-style: solid;
  border-color: #059669;
  transform: translateY(-1px);
}

.leaf-cite-rm-author {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.leaf-cite-rm-author:hover {
  color: #ef4444;
  background-color: #fee2e2;
  transform: scale(1.08);
}

/* ── Form Panels ────────────────────────────────────────────── */
.leaf-cite-form-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.leaf-cite-form-panel .leaf-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

/* ── Formatted Output Card ──────────────────────────────────── */
.leaf-cite-output-wrap {
  margin-top: 2rem;
  background: #ffffff;
  border: 1px solid #a7f3d0;
  border-radius: 20px;
  padding: 2rem 2.25rem;
  display: none;
  position: relative;
  box-shadow: 0 10px 30px -10px rgba(5, 150, 105, 0.12);
}

.leaf-cite-output-wrap.visible {
  display: block;
  animation: leafFadeIn 0.35s ease;
}

.leaf-cite-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.leaf-cite-output-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leaf-cite-text {
  font-family: 'Times New Roman', Times, Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.85;
  color: #0f172a;
  padding: 1.5rem 1.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  word-break: break-word;
}

.leaf-cite-text em {
  font-style: italic;
}

.leaf-cite-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.leaf-cite-copy-btn:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
  transform: translateY(-1px);
}

.leaf-cite-copy-btn.copied {
  background: #047857;
  transform: scale(0.98);
}
