/*
 * JANI test archive/list pages.
 * The list reuses the home test card ratio and keeps metadata intentionally compact.
 */

.jani-test-list-page {
  padding: 28px 15px 42px;
  background: #fff;
}

.jani-test-list-header {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  position: static;
}

.jani-test-list-header-copy {
  display: grid;
  gap: 7px;
}

.jani-test-list-header p {
  margin: 0;
  color: #5661ff;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
}

.jani-test-list-header h1 {
  margin: 0;
  color: #1d2433;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 900;
}

.jani-test-list-header span {
  display: block;
  max-width: 330px;
  color: #697386;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 800;
}

.jani-test-list-header-state {
  margin-top: 11px;
}

.jani-test-list-header-state span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  border: 1px solid #e6ebf7;
  border-radius: 999px;
  background: #fbfcff;
  color: #5661ff;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1;
  padding: 0 10px;
}

.jani-test-list-controls {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.jani-test-control-group {
  display: grid;
  gap: 7px;
}

.jani-test-control-group--sort .jani-test-chip-row {
  padding: 3px;
  border: 1px solid #e8edf8;
  border-radius: 8px;
  background: #f8faff;
}

.jani-test-control-label {
  color: #8a92a3;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.jani-test-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jani-test-filter-chip,
.jani-test-sort-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  border: 1px solid #e1e6f5;
  border-radius: 8px;
  background: #fff;
  color: #697386;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 0 11px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.jani-test-sort-chip {
  flex: 1 1 0;
  min-width: 0;
  border-color: transparent;
  background: transparent;
}

.jani-test-filter-chip:hover,
.jani-test-sort-chip:hover {
  color: #4451ff;
  transform: translateY(-1px);
}

.jani-test-filter-chip:hover {
  border-color: #b9c2ff;
}

.jani-test-filter-chip.is-active,
.jani-test-sort-chip.is-active {
  border-color: #5661ff;
  background: #fff;
  color: #4451ff;
  box-shadow: 0 6px 14px rgba(86, 97, 255, .12);
}

.jani-test-list-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #818899;
  font-size: 12px;
  font-weight: 900;
}

.jani-test-list-summary strong {
  color: #5661ff;
  font-size: 12px;
  font-weight: 900;
}

.jani-test-list-summary a {
  margin-left: auto;
  color: #5661ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
}

.jani-test-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  justify-content: start;
  gap: 15px 11px;
}

.jani-test-list-grid .test-card {
  margin: 0;
}

.jani-test-card--list,
.jani-test-card--popular {
  border: 1px solid #edf1f8;
  box-shadow: 0 6px 14px rgba(31, 42, 68, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.jani-test-card--list:hover,
.jani-test-card--popular:hover {
  transform: translateY(-3px);
  border-color: #dce3ff;
  box-shadow: 0 12px 22px rgba(31, 42, 68, .1);
}

.jani-test-card-rank {
  position: absolute;
  z-index: 3;
  top: 7px;
  left: 7px;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  background: #5661ff;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 0 8px;
  box-shadow: 0 8px 16px rgba(86, 97, 255, .26);
}

.jani-test-list-grid .jani-home-card-thumb {
  position: relative;
  overflow: hidden;
}

.jani-test-card-compact-meta {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  max-width: calc(100% - 14px);
  border: 1px solid rgba(255, 255, 255, .84);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  color: #5661ff;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  padding: 0 8px;
  box-shadow: 0 8px 18px rgba(31, 42, 68, .12);
  backdrop-filter: blur(8px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jani-test-card-rank + .jani-home-card-thumb .jani-test-card-compact-meta {
  right: 7px;
  left: auto;
}

.jani-test-card--list .test-title,
.jani-test-card--popular .test-title {
  color: #1d2433;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.35;
  min-height: 34px;
  padding: 8px 8px 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jani-test-card--list .jani-test-card-meta,
.jani-test-card--popular .jani-test-card-meta {
  display: none;
}

.jani-test-card--list .test-views,
.jani-test-card--popular .test-views {
  padding-bottom: 9px;
  color: #7f8795;
  font-size: 11px;
  font-weight: 850;
}

.jani-test-list-empty {
  padding: 26px 18px;
  border: 1px dashed #cfd6e8;
  border-radius: 8px;
  background: #fbfcff;
  color: #697386;
  text-align: center;
}

.jani-test-list-empty strong {
  display: block;
  color: #1d2433;
  font-size: 16px;
  margin-bottom: 6px;
}

.jani-test-list-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.jani-test-list-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 24px 0 0;
}

.jani-test-list-pagination a,
.jani-test-list-pagination span {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8deec;
  border-radius: 8px;
  background: #fff;
  color: #4b5568;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.jani-test-list-pagination a:hover,
.jani-test-list-pagination a.is-active {
  border-color: #5661ff;
  background: #5661ff;
  color: #fff;
}

.jani-test-list-pagination .dots {
  border-color: transparent;
  background: transparent;
  color: #9aa2b2;
}

@media (max-width: 390px) {
  .jani-test-list-page {
    padding-right: 13px;
    padding-left: 13px;
  }

  .jani-test-list-grid {
    grid-template-columns: repeat(auto-fill, 116px);
    gap: 14px 10px;
  }
}
