/* Minimal search/result page polish for Xueheng. Scoped to .xh-search. */
.xh-search-page-title {
  background: linear-gradient(180deg, #fafbfc 0%, #f3f5f8 100%);
  border-bottom: 1px solid #e3e7ee;
}
.xh-search-page-title .title h1 {
  color: #263238;
  letter-spacing: .02em;
}
.xh-search-page-title .pagenation {
  color: #7b8794;
}

.xh-search {
  --xh-search-border: #e3e7ee;
  --xh-search-soft: #f6f8fb;
  --xh-search-text: #24313f;
  --xh-search-muted: #6b7785;
  --xh-search-primary: #b6332c;
  --xh-search-primary-dark: #942821;
  color: var(--xh-search-text);
}

.xh-search * { box-sizing: border-box; }

.xh-search-landing-title {
  margin: 0 0 10px 0;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
}

.xh-search-card {
  margin: 0 0 16px 0;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--xh-search-border);
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(22, 34, 51, 0.05);
}

.xh-search-form {
  display: grid;
  gap: 10px;
}

.xh-search-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: flex-end;
}

.xh-search-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.xh-search-field label,
.xh-search-label {
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
}

.xh-search-field input[type="text"],
.xh-search-input {
  height: 32px !important;
  min-width: 180px;
  padding: 5px 9px;
  border: 1px solid #cfd7e2;
  border-radius: 6px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.xh-search-field input[type="text"]:focus,
.xh-search-input:focus {
  border-color: #9fb3ce;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .10);
}

.xh-search-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.xh-search-btn,
.xh-search input[type="submit"].xh-search-btn,
.xh-search a.xh-search-btn,
.xh-search button.xh-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  border: 1px solid #c7ced8;
  border-radius: 6px;
  background: #fff;
  color: #2b3440;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.xh-search-btn:hover,
.xh-search input[type="submit"].xh-search-btn:hover,
.xh-search a.xh-search-btn:hover,
.xh-search button.xh-search-btn:hover {
  background: #f1f4f8;
  border-color: #9da8b6;
  color: #111827;
}

.xh-search-btn-primary,
.xh-search input[type="submit"].xh-search-btn-primary,
.xh-search button.xh-search-btn-primary {
  background: var(--xh-search-primary);
  border-color: var(--xh-search-primary);
  color: #fff;
  font-weight: 600;
}
.xh-search-btn-primary:hover,
.xh-search input[type="submit"].xh-search-btn-primary:hover,
.xh-search button.xh-search-btn-primary:hover {
  background: var(--xh-search-primary-dark);
  border-color: var(--xh-search-primary-dark);
  color: #fff;
}

.xh-search-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #374151;
  font-size: 13px;
  line-height: 1.5;
}

.xh-search-check input {
  margin: 0;
}

.xh-search-help {
  color: var(--xh-search-muted);
  font-size: 13px;
  line-height: 1.65;
}

.xh-search-variant {
  margin: 8px 0 10px 0;
  color: var(--xh-search-muted);
  font-size: 13px;
}
.xh-search-info {
  margin: 8px 0 14px 0;
  padding: 9px 12px;
  border-left: 3px solid var(--xh-search-primary);
  background: #fff9f8;
  color: #63423f;
  border-radius: 4px;
  font-size: 14px;
}
.xh-search-info:empty { display: none; }

.xh-search-scope {
  margin: 10px 0 14px 0;
  padding: 12px 14px;
  border: 1px solid #e8d7d3;
  background: linear-gradient(180deg, #fffdfc 0%, #fff7f5 100%);
  border-radius: 10px;
}
.xh-search-scope-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.xh-search-scope-title {
  color: #7a2e27;
  font-size: 14px;
  font-weight: 700;
}
.xh-search-scope-meta {
  color: #6b4a46;
  font-size: 13px;
  line-height: 1.7;
}
.xh-search-scope-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.xh-search-scope-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #ead7d2;
  border-radius: 999px;
  background: #ffffff;
  color: #53413e;
  font-size: 13px;
  line-height: 1.3;
  box-shadow: 0 1px 2px rgba(22, 34, 51, 0.04);
}
.xh-search-scope-empty {
  color: #7b6a67;
  font-size: 13px;
}

.xh-search-empty {
  margin: 14px 0;
  padding: 20px 22px;
  background: #fff;
  border: 1px dashed #cfd7e2;
  border-radius: 10px;
  color: #6b7785;
  line-height: 1.8;
}
.xh-search-empty-title {
  margin-bottom: 4px;
  color: #374151;
  font-weight: 600;
}
.xh-search-empty-small {
  font-size: 13px;
  color: #7b8794;
}

.xh-results {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.xh-result-card {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--xh-search-border);
  border-radius: 9px;
  box-shadow: 0 1px 4px rgba(22, 34, 51, 0.04);
}
.xh-result-card:hover {
  border-color: #ccd5e3;
  box-shadow: 0 4px 14px rgba(22, 34, 51, 0.08);
}

.xh-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--xh-search-muted);
  font-size: 13px;
}

.xh-result-id {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--xh-search-soft);
  color: #5d6979;
}

.xh-result-text {
  font-size: 15px;
  line-height: 1.75;
  color: #202b36;
}

.xh-result-meta {
  color: var(--xh-search-muted);
  font-size: 13px;
  line-height: 1.6;
}

.xh-result-title {
  font-weight: 600;
  color: #1f2937;
}

.xh-search .highlight {
  padding: 0 2px;
  border-radius: 2px;
}

.xh-pagination {
  margin: 12px 0;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  background: var(--xh-search-soft);
  border: 1px solid var(--xh-search-border);
  border-radius: 8px;
}
.xh-page-current {
  color: #4b5563;
  font-size: 13px;
  margin-right: 4px;
}
.xh-page-form {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.xh-page-input {
  height: 28px !important;
  width: 52px;
  padding: 4px 6px;
  border: 1px solid #cfd7e2;
  border-radius: 5px;
}

.xh-scripture-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--xh-search-border);
  border-radius: 9px;
  background: #fff;
}
.xh-search table.table-list {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.xh-search table.table-list th,
.xh-search table.table-list td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: top;
  line-height: 1.65;
}
.xh-search table.table-list th {
  background: #f8fafc;
  color: #374151;
  font-weight: 600;
  white-space: nowrap;
}
.xh-search table.table-list tr:hover td { background: #fffdf8; }

@media (max-width: 760px) {
  .xh-search-card { padding: 13px; }
  .xh-search-fields { display: grid; grid-template-columns: 1fr; }
  .xh-search-field { width: 100%; }
  .xh-search-field input[type="text"], .xh-search-input { width: 100% !important; }
  .xh-result-head { align-items: flex-start; }
}
