/* Paper Finder — the "Find papers yourself" card in the research-ads
   papers gate (views/research_ads_papers_gates.js). Its own file so the
   gate's own stylesheet stays about the gate. */

.ra-finder {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  background: var(--surface-2, transparent);
}

.ra-finder h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

/* Two-pane lookup (owner directive 2026-08-23): searches on the left, the
   search site itself on the right — the Flashcard Creator Suite's browser
   screen. */

.pf-panes {
  display: flex;
  gap: 14px;
  align-items: stretch;
  min-height: 520px;
}

.pf-left {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.pf-right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.pf-left h4,
.pf-right h4 {
  margin: 0;
  font-size: 0.95rem;
}

.pf-add-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pf-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border);
  background: var(--surface, transparent);
  color: inherit;
}

.pf-plus {
  font-size: 1.05rem;
  line-height: 1;
}

.pf-term-list {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-term {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid transparent;
}

.pf-term-current {
  border-color: var(--accent, currentColor);
  background: var(--surface, transparent);
}

.pf-term-pick,
.pf-term-drop {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 2px 4px;
}

.pf-term-pick {
  flex: 1 1 auto;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pf-term-drop {
  opacity: 0.6;
  font-size: 1.05em;
  line-height: 1;
}

.pf-term-drop:hover {
  opacity: 1;
}

.pf-paste {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.pf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pf-current {
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-engine {
  padding: 6px 8px;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border);
  background: var(--surface, transparent);
  color: inherit;
}

.pf-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pf-zoom-pct {
  min-width: 46px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Switched off until the pick script exists. Looks off, says why. */
.pf-soon {
  padding: 4px 10px;
  border: 1px dashed var(--border);
  border-radius: 999px;
  opacity: 0.55;
  cursor: not-allowed;
  font-size: 0.85rem;
}

/* The space the native search window is parked over. Nothing is drawn
   inside it once that window is up. */
.pf-pane {
  flex: 1 1 auto;
  min-height: 440px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 10px);
  background: var(--surface, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
}

.pf-pane-web,
.pf-pane-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.pf-pane-web[hidden],
.pf-pane-hint[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .pf-panes {
    flex-direction: column;
  }

  .pf-left {
    flex: 0 0 auto;
  }
}

.ra-paper-source {
  display: block;
  font-size: 0.82rem;
  opacity: 0.75;
}
