/* Search Performance — Sprint 7 wireframe layout */

.seo-workspace-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

/* ── SEO Site Analysis panel ── */
.seo-search-panel {
  background: #fff;
  border-bottom: 2px solid #e2e8f0;
  padding: 20px 24px 16px;
}

.seo-search-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.seo-search-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.seo-form-group {
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.seo-form-group:last-of-type {
  border-bottom: none;
}

.seo-form-group-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin-bottom: 8px;
}

.seo-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.seo-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 130px;
}

.seo-field--grow { flex: 1 1 160px; }

.seo-field--competitors { flex: 1 1 200px; min-width: 180px; }

.seo-field span {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

.seo-field span em { color: #dc2626; font-style: normal; }

.seo-inline-plus {
  background: none;
  border: none;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.75rem;
}

.seo-competitors-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seo-competitor-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.seo-competitor-input {
  flex: 1;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.875rem;
}

.seo-competitor-add,
.seo-competitor-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  color: #475569;
}

.seo-competitor-add:hover { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }

.seo-field input,
.seo-field select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.875rem;
  background: #fff;
  color: #0f172a;
}

.seo-field input:focus,
.seo-field select:focus,
.seo-competitor-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.seo-field--radio {
  border: none;
  padding: 0;
  margin: 0;
}

.seo-field--radio legend {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  margin-bottom: 4px;
}

.seo-field--radio label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: #334155;
  margin-right: 12px;
  cursor: pointer;
  text-transform: none;
  font-weight: 400;
}

.seo-form-group--sources { padding-top: 14px; }

.seo-sources-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-source-toggle input { display: none; }

.seo-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s;
}

.seo-source-toggle input:checked + .seo-source-pill {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.seo-search-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0 8px;
}

.seo-run-audit-btn {
  padding: 10px 28px !important;
  font-weight: 600;
  font-size: 0.9375rem !important;
}

/* ── Pinned Filter Bar ── */
.seo-pinned-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 20;
  flex-wrap: wrap;
}

.seo-pinned-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  white-space: nowrap;
}

.seo-pinned-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.seo-pinned-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
}

.seo-pinned-chip:first-of-type {
  background: #2563eb;
  border-color: #3b82f6;
  color: #fff;
}

.seo-search-collapsed { display: none; }

.seo-pinned-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: transparent;
  color: #93c5fd;
  border: 1px solid #334155;
  cursor: pointer;
  white-space: nowrap;
}
.seo-pinned-edit-btn:hover { background: #1e293b; color: #fff; }

/* ── History ── */
.seo-history-panel { margin-top: 12px; }

.seo-history-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  list-style: none;
}

.seo-history-summary::-webkit-details-marker { display: none; }

.seo-history-count {
  background: #e2e8f0;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.6875rem;
}

.seo-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.seo-history-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 4px 12px;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.seo-history-item--active { border-color: #2563eb; background: #eff6ff; }

.seo-history-domain { font-weight: 600; font-size: 0.8125rem; }

.seo-history-meta { grid-column: 1; font-size: 0.6875rem; color: #475569; }

.seo-history-date { font-size: 0.6875rem; color: #475569; }

.seo-history-scores {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 6px;
}

.seo-history-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: #475569;
  font-size: 0.8125rem;
}

/* ── Empty state & workspace body ── */
.seo-workspace-body { flex: 1; }

.seo-workspace-body .ri-seo-ws-nav { display: none; }

.seo-workspace-body .ri-seo-ws-body {
  grid-template-columns: 1fr;
}

.seo-workspace-body .ri-seo-ws-content {
  max-width: none;
}

.seo-entry-empty {
  text-align: center;
  padding: 40px 24px 56px;
  max-width: 480px;
  margin: 0 auto;
}

.seo-entry-empty-icon { color: #475569; margin-bottom: 12px; }

.seo-entry-empty h3 { margin: 0 0 8px; font-size: 1.125rem; color: #0f172a; }

.seo-entry-empty p { margin: 0; color: #475569; font-size: 0.875rem; line-height: 1.5; }

/* Workspace header chips */
.ri-seo-ws-context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.ri-seo-ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 500;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.ri-seo-ctx-chip--primary {
  background: #dbeafe;
  color: #1e40af;
  border-color: #bfdbfe;
}

.ri-seo-ws-kpis--enterprise .ri-seo-ws-kpi strong { font-size: 1rem; }

@media (max-width: 768px) {
  .seo-search-panel, .seo-pinned-bar { padding-left: 16px; padding-right: 16px; }
  .seo-pinned-label { width: 100%; }
}
/* Sprint 8 — honest data-source labeling */
.seo-sources-status {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #FEF3C7;
  color: #92400E;
}
.seo-sources-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--color-text-muted, #6B7280);
}

/* Sprint 14 - honest filter-context note */
.seo-filter-honesty-note { margin: 10px 0 14px; font-size: 12px; color: var(--color-text-muted, #6B7280); line-height: 1.55; }
