/* ── Surah index ──────────────────────────────────────────────── */

.surah-index-page {
  padding: 1.5rem 1rem 3rem;
}

.surah-filter-bar {
  margin: 1.25rem 0 1.5rem;
}

.surah-filter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #617488;
  margin-bottom: 0.4rem;
}

.surah-filter-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

.surah-filter-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: -1px;
}

.surah-index-stats {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0;
}

.surah-index-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.surah-index-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 0.9rem;
}

.surah-index-row:hover {
  border-color: #b8d8d3;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.surah-index-row.has-pairs {
  color: var(--text);
}

.surah-index-num {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.surah-index-name {
  font-weight: 500;
}

.surah-index-row.has-pairs .surah-index-name {
  font-weight: 600;
}

.surah-index-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0.1em 0.55em;
  min-width: 1.4em;
  text-align: center;
  line-height: 1.6;
}

.surah-index-empty {
  font-size: 0.78rem;
  color: var(--border);
  text-align: right;
}

@media (min-width: 600px) {
  .surah-index-page {
    padding: 2rem 4vw 4rem;
  }
  .surah-index-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (min-width: 1024px) {
  .surah-index-page {
    padding: 2.5rem 6vw 5rem;
  }
  .surah-index-list {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
