/* Notation search page — search-driven interface for the 27,830-symbol atlas */

.page-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
  color: #d8d8d8;
}

.page-hero {
  text-align: center;
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid #1a1a1a;
}
.page-hero h1 {
  margin: 0 0 0.55rem;
  font-size: 1.85rem;
  color: #f5d76e;
}
.page-hero .subtitle {
  max-width: 780px;
  margin: 0 auto;
  color: #aaa;
  font-size: 0.92rem;
  line-height: 1.6;
}
.page-hero code {
  background: #1a1a1a;
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
  font-size: 0.86em;
  color: #f5d76e;
}

/* ===== Search controls ===== */
.search-controls {
  background: #0e0e0e;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 0.5rem 0;
  margin: 1.5rem 0 2rem;
}
.search-row {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #1a1a1a;
}
.search-row:last-child { border-bottom: none; }
.search-row-pending { opacity: 0.62; }

.search-num {
  font-family: ui-monospace, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f5d76e;
  text-align: center;
  background: #1a1306;
  border-radius: 4px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
}

.search-body { min-width: 0; }
.search-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.search-help {
  font-size: 0.78rem;
  color: #888;
  line-height: 1.5;
  margin-top: 0.5rem;
}
.search-help-pending {
  color: #aaa;
  background: #1a1306;
  border: 1px dashed #f5d76e44;
  border-radius: 4px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.6rem;
}

.search-body select,
.search-body input[type=text] {
  background: #181818;
  border: 1px solid #333;
  color: #d8d8d8;
  padding: 0.5rem 0.7rem;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  width: 100%;
  max-width: 420px;
}
.search-body select:focus { outline: 1px solid #f5d76e; border-color: #f5d76e; }

.dim-buttons, .k-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.dim-btn, .k-btn {
  background: #181818;
  border: 1px solid #333;
  color: #d8d8d8;
  padding: 0.45rem 0.95rem;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dim-btn:hover, .k-btn:hover {
  border-color: #f5d76e;
  background: #1a1306;
}
.dim-btn.active, .k-btn.active {
  border-color: #f5d76e;
  background: #2a2000;
  color: #f5d76e;
}
.dim-pending, .k-pending {
  opacity: 0.45;
  cursor: not-allowed;
  font-size: 0.74rem;
}

.found-picker {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: #131313;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
}
.found-picker-label {
  font-size: 0.78rem;
  color: #cfcfcf;
  margin-bottom: 0.5rem;
}
.found-picker-label span {
  font-family: ui-monospace, monospace;
  color: #f5d76e;
  font-weight: 700;
}
.found-picker-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.fp-btn {
  background: #181818;
  border: 1px solid #333;
  color: var(--c, #fff);
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.fp-btn:hover { border-color: var(--c); }
.fp-btn.active {
  background: var(--c);
  color: #000;
  border-color: var(--c);
}
.fp-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.search-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.25rem 0.5rem;
  border-top: 1px solid #1a1a1a;
}
.search-clear {
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.82rem;
}
.search-clear:hover { color: #fff; border-color: #888; }
.search-status {
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
}
.search-status.has-results { color: #f5d76e; font-style: normal; font-weight: 600; }

/* ===== Results ===== */
.results-section { margin-top: 1.5rem; }
.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.results-title {
  font-size: 1.1rem;
  color: #f5d76e;
  margin: 0;
}
.results-meta {
  font-size: 0.85rem;
  color: #888;
  font-family: ui-monospace, monospace;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}
.results-placeholder {
  grid-column: 1 / -1;
  padding: 3rem 1rem;
  text-align: center;
  color: #555;
  font-size: 0.95rem;
  background: #0a0a0a;
  border: 1px dashed #2a2a2a;
  border-radius: 6px;
}

.result-cell {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.1s;
}
.result-cell:hover {
  border-color: #f5d76e;
  transform: translateY(-1px);
}
.result-cell img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0a0a0a;
  border-radius: 2px;
}
.result-meta {
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  color: #888;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.result-shape {
  color: #d8d8d8;
  font-weight: 600;
  font-size: 0.78rem;
  word-break: break-word;
}
.result-dim {
  color: #6b8bff;
  font-weight: 700;
}
.result-dim.dim-4d { color: #b5f; }
.result-dec { color: #f5d76e; }
.result-bucket {
  color: #aaa;
  font-size: 0.66rem;
}

.results-pagination {
  text-align: center;
  margin-top: 1.5rem;
}
.load-more {
  background: #181818;
  border: 1px solid #f5d76e;
  color: #f5d76e;
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  font-weight: 600;
}
.load-more:hover { background: #2a2000; }
