/* ── Chips row ── */
.cite-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.cite-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--gsp-font, inherit);
  font-size: 13px;
  font-weight: 600;
  color: var(--gsp-foreground, #0f172a);
  background: var(--gsp-background, #fff);
  border: 1px solid var(--gsp-border, #e2e8f0);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  line-height: 1;
  white-space: nowrap;
}

.cite-chip:hover {
  border-color: var(--gsp-primary, #044597);
  box-shadow: 0 1px 3px rgba(4, 69, 151, .1);
}

.cite-chip.is-active {
  border-color: var(--gsp-primary, #044597);
  background: rgba(4, 69, 151, .04);
}

.cite-chip--link {
  text-decoration: none;
  color: var(--gsp-foreground, #0f172a);
}

.cite-chip--link:hover {
  color: var(--gsp-foreground, #0f172a);
  text-decoration: none;
}

.cite-chip__icon {
  height: 16px;
  width: auto;
  flex-shrink: 0;
}

.cite-chip__name {
  display: none;
}

.cite-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  border-radius: 10px;
  background: var(--gsp-primary, #044597);
  color: #fff;
}

.cite-chip__ext {
  font-size: 10px;
  color: var(--gsp-muted-foreground, #64748b);
}

/* ── Accordion panels ── */
.cite-panels {
  margin-top: 0;
}

.cite-panel {
  overflow: hidden;
  transition: max-height 250ms ease, opacity 200ms ease;
}

.cite-panel__head {
  font-size: 12px;
  font-weight: 600;
  color: var(--gsp-muted-foreground, #64748b);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 12px 0 6px;
}

.cite-panel__n {}

.cite-panel__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.cite-panel__list::-webkit-scrollbar {
  width: 4px;
}

.cite-panel__list::-webkit-scrollbar-thumb {
  background: var(--gsp-border, #e2e8f0);
  border-radius: 2px;
}

/* ── Citation row ── */
.cite-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--gsp-border, #e2e8f0);
}

.cite-row:last-child {
  border-bottom: none;
}

.cite-row__authors {
  font-size: 12.5px;
  color: var(--gsp-muted-foreground, #64748b);
  line-height: 1.5;
}

.cite-row__year {
  font-size: 12.5px;
  color: var(--gsp-muted-foreground, #64748b);
}

.cite-row__title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gsp-foreground, #0f172a);
  line-height: 1.45;
  margin-top: 1px;
}

.cite-row__journal {
  display: block;
  font-size: 12.5px;
  color: var(--gsp-muted-foreground, #64748b);
  font-style: italic;
  line-height: 1.5;
}

.cite-row__doi {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  word-break: break-all;
}

.cite-row__doi a {
  color: var(--gsp-primary, #044597);
  text-decoration: none;
}

.cite-row__doi a:hover {
  text-decoration: underline;
}

/* ── Loader ── */
#citations-loader {
  margin: 12px auto;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gsp-border, #e2e8f0);
  border-radius: 50%;
  border-top-color: var(--gsp-primary, #044597);
  animation: cite-spin .7s linear infinite;
}

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