/* Scoped styles for historic-newspaper-archive-search (prefix: hnas-) */

.hnas-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text, #1f2937);
}

.hnas-hero {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hnas-pill-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  background-color: #f1f5f9;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.hnas-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  line-height: 1.25;
}

.hnas-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  max-width: 820px;
}

/* Nav Tabs */
.hnas-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.hnas-tab-btn {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -2px;
}

.hnas-tab-btn:hover {
  color: #0f172a;
}

.hnas-tab-active {
  color: #0f172a;
  border-bottom-color: #0f172a;
}

.hnas-tab-panel {
  display: none;
}

.hnas-panel-active {
  display: block;
}

/* Panel Card */
.hnas-card-panel {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hnas-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem 0;
}

.hnas-text-muted {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1.25rem 0;
  line-height: 1.45;
}

/* Directory Header */
.hnas-dir-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hnas-count-badge {
  font-size: 0.825rem;
  font-weight: 600;
  color: #475569;
  background-color: #f1f5f9;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
}

.hnas-filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .hnas-filter-bar {
    grid-template-columns: 1fr;
  }
}

.hnas-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hnas-search-field {
  flex-grow: 1;
}

.hnas-grow-field {
  flex-grow: 1;
}

.hnas-lbl {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.hnas-input, .hnas-select {
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hnas-input:focus, .hnas-select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.15);
}

/* Cards Grid */
.hnas-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.25rem;
}

.hnas-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}

.hnas-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  border-color: #94a3b8;
}

.hnas-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.hnas-date-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.25rem;
}

.hnas-era {
  color: #64748b;
  font-weight: normal;
}

.hnas-card-headline {
  font-family: Georgia, Cambria, serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.35rem 0;
  line-height: 1.3;
}

.hnas-source-meta {
  font-size: 0.8rem;
  color: #64748b;
}

.hnas-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background-color: #f1f5f9;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: #1e293b;
}

.hnas-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.hnas-badge-cat {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.hnas-card-snippet {
  font-family: Georgia, Cambria, serif;
  font-style: italic;
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  flex-grow: 1;
  background-color: #f8fafc;
  padding: 0.75rem;
  border-left: 3px solid #cbd5e1;
  border-radius: 0 6px 6px 0;
}

.hnas-card-footer {
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.hnas-card-btn {
  width: 100%;
  text-decoration: none;
  box-sizing: border-box;
}

.hnas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.hnas-btn-primary {
  background-color: #0f172a;
  color: #ffffff;
}

.hnas-btn-primary:hover {
  background-color: #334155;
}

.hnas-btn-secondary {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.hnas-btn-secondary:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

.hnas-no-results {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
}

/* Live Search Box */
.hnas-live-search-box {
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.hnas-search-input-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}

@media (max-width: 640px) {
  .hnas-search-input-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.hnas-api-status {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.hnas-status-loading {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.hnas-status-error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.hnas-results-container {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.hnas-subheading {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1rem 0;
}

.hnas-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hnas-result-item {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hnas-item-title {
  font-family: Georgia, Cambria, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.hnas-item-meta {
  font-size: 0.85rem;
  color: #64748b;
}

/* Guide Grid */
.hnas-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.hnas-guide-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
}

.hnas-guide-box-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
}

.hnas-guide-box p {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

/* Ad Slot */
.hnas-ad-slot {
  min-height: 280px;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
}

/* Disclaimer */
.hnas-disclaimer {
  background-color: #f8fafc;
  border-left: 4px solid #475569;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  margin: 2rem 0;
}

.hnas-disclaimer-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.hnas-disclaimer-text {
  font-size: 0.85rem;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}
