/* HT Advanced Search — single-column results, strong contrast, Astra-friendly */

.ht-search { width: 100%; margin: 1rem auto; }

/* Search bar */
.ht-search-bar {
  display: flex; gap: .5rem; align-items: center; margin-bottom: .6rem;
}
.ht-input {
  flex: 1 1 auto; padding: .55rem .75rem; font-size: 1rem;
  border: 1px solid var(--ast-border-color, #cfd3d7); border-radius: 6px;
  color: #111; background: #fff;
}
.ht-btn {
  padding: .55rem .8rem; border: 1px solid var(--ast-border-color, #cfd3d7);
  border-radius: 6px; background: #f7f7f7; color: #111; cursor: pointer;
}

/* Filters as checkboxes (strong contrast) */
.ht-filters {
  display: flex; flex-wrap: wrap; gap: .45rem; margin: .25rem 0 .6rem;
  border: 0; padding: 0; align-items: center;
}
.ht-filter {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .55rem; border: 1px solid #cfd3d7; border-radius: 999px;
  background: #fff; color: #111; cursor: pointer; user-select: none;
}
.ht-filter-input { accent-color: #333; }
.ht-filter:hover { background: #f2f5f8; }
.ht-filter-input:checked + .ht-filter-label,
.ht-filter-input:checked ~ .ht-filter-label { font-weight: 600; }
.ht-count { margin-left: .5rem; font-size: .9rem; color: #222; opacity: .85; }

/* Results — ALWAYS single column */
.ht-results { display: grid; grid-template-columns: 1fr; gap: .75rem; }

/* Card with left thumbnail — reduced padding and body text size */
.ht-card {
  display: grid; grid-template-columns: auto 1fr; gap: .6rem;
  padding: .75rem; border: 1px solid #e0e4e8;
  border-radius: 10px; background: #fff; align-items: start; color: #111;
}
.ht-thumb { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; display: block; background: #eee; }
.ht-thumb-link { display: block; }
.ht-card-body { min-width: 0; }
.ht-card-title { margin: 0 0 .2rem; font-size: 1.05rem; line-height: 1.3; color: inherit; }
.ht-card-title a { color: inherit; text-decoration: none; }
.ht-card-title a:hover { text-decoration: underline; }
.ht-date { font-size: .82rem; color: #555; margin-bottom: .3rem; }
.ht-card-excerpt { margin: 0; color: #222; font-size: .95rem; line-height: 1.35; }

/* Pagination + states */
.ht-pagination { display: flex; align-items: center; gap: .6rem; justify-content: center; margin-top: .6rem; }
.ht-page { font-size: .95rem; color: #111; }
.ht-loading, .ht-error, .ht-empty {
  padding: .6rem .8rem; border-radius: 8px; background: #f7f7f7; border: 1px solid #e0e4e8; color: #111;
}

/* Highlight */
mark { background: #fff2a8; padding: 0 .15em; border-radius: 3px; color: inherit; }

/* Screen-reader only (fallback for themes missing it) */
.screen-reader-text {
  position: absolute !important;
  height: 1px; width: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Compact on very narrow screens */
@media (max-width: 420px) {
  .ht-thumb { width: 72px; height: 72px; }
}