/* PDF Search — page-specific styles */

textarea { min-height: 90px; }

.result-hidden { display: none; }

/* ── Field inputs ────────────────────────────────────────────────────────── */
.field input[type="text"] {
  width: 100%;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.93rem;
  font-family: inherit;
  transition: border-color .2s;
}
.field input[type="text"]:focus { outline: none; border-color: #0c6e78; box-shadow: 0 0 0 3px rgba(12,110,120,.12); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-danger { background: #c53030; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #9b2c2c; }

/* ── Answer block ────────────────────────────────────────────────────────── */
.answer-block {
  background: #f0fafa;
  border: 1px solid #b2e0e4;
  border-radius: 8px;
  padding: 18px 20px;
  font-size: 0.97rem;
  line-height: 1.7;
  color: #1a202c;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 24px;
}

/* ── Sources ─────────────────────────────────────────────────────────────── */
.sources-heading {
  font-size: 0.78rem;
  font-weight: 600;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}

.source-item { border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px 16px; margin-bottom: 10px; background: #f7fafc; }
.source-item:last-child { margin-bottom: 0; }

.source-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.source-badge { font-size: 0.73rem; font-weight: 700; background: #0c6e78; color: #fff; border-radius: 4px; padding: 2px 8px; letter-spacing: .03em; }
.source-file { font-size: 0.82rem; color: #4a5568; font-weight: 500; word-break: break-all; }
.source-chunk { font-size: 0.72rem; color: #a0aec0; }

.source-text { font-size: 0.88rem; color: #4a5568; line-height: 1.6; max-height: 100px; overflow: hidden; position: relative; }
.source-text.expanded { max-height: none; }
.source-text::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 32px;
  background: linear-gradient(transparent, #f7fafc);
  pointer-events: none;
}
.source-text.expanded::after { display: none; }

.expand-btn { font-size: 0.78rem; color: #0c6e78; background: none; border: none; cursor: pointer; padding: 4px 0 0; font-weight: 600; }
.expand-btn:hover { text-decoration: underline; }

/* ── Remove-from-search collapsible ─────────────────────────────────────── */
details.remove-section {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 0;
  margin-bottom: 24px;
  overflow: hidden;
}
details.remove-section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 32px;
  cursor: pointer;
  user-select: none;
  font-size: 1rem;
  font-weight: 600;
  color: #0c6e78;
  text-transform: uppercase;
  letter-spacing: .04em;
}
details.remove-section > summary::-webkit-details-marker { display: none; }
details.remove-section > summary::before { content: '▶'; font-size: 0.6rem; transition: transform .2s; flex-shrink: 0; }
details.remove-section[open] > summary::before { transform: rotate(90deg); }
details.remove-section > summary:hover { background: #f7fafc; }
details.remove-section .remove-body { padding: 0 32px 28px; }

/* ── No-results notice ───────────────────────────────────────────────────── */
.no-results { text-align: center; padding: 32px 0; color: #718096; font-size: 0.95rem; }
.no-results span { font-size: 2rem; display: block; margin-bottom: 8px; }
