/* test-blog home only — search bar above categories + header search polish */

.home-aisulivosrch-search {
  --hm-accent: #4776e8;
  --hm-accent-2: #8e54e9;
  --hm-border: rgba(148, 163, 184, 0.28);
  --hm-card: #ffffff;
  --hm-text: #0f172a;
  --hm-muted: #64748b;
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto 14px;
  padding: 0 16px;
  box-sizing: border-box;
  z-index: 40;
}

body.dark-mode .home-aisulivosrch-search {
  --hm-border: rgba(148, 163, 184, 0.22);
  --hm-card: #0f172a;
  --hm-text: #f1f5f9;
  --hm-muted: #94a3b8;
}

.home-aisulivosrch-search__field {
  position: relative;
  display: flex;
  align-items: center;
}

.home-aisulivosrch-search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--hm-muted);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

.home-aisulivosrch-search__input {
  width: 100%;
  min-height: 46px;
  padding: 12px 44px 12px 40px;
  border: 1px solid var(--hm-border);
  border-radius: 999px;
  background: var(--hm-card);
  color: var(--hm-text);
  font: inherit;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-aisulivosrch-search__input::placeholder {
  color: var(--hm-muted);
}

.home-aisulivosrch-search__input:focus {
  border-color: var(--hm-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hm-accent) 18%, transparent);
}

.home-aisulivosrch-search__btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hm-accent), var(--hm-accent-2));
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 1;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.home-aisulivosrch-search__btn:hover {
  filter: brightness(1.06);
}

.home-aisulivosrch-search__btn:active {
  transform: translateY(-50%) scale(0.96);
}

.home-aisulivosrch-search__results {
  display: none;
  margin-top: 8px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

body.light-mode .home-aisulivosrch-search__results {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.home-aisulivosrch-search__results[style*="display: block"],
.home-aisulivosrch-search__results[style*="display:block"] {
  display: block !important;
}

.home-aisulivosrch-search__results-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* —— Header dropdown search (test-blog) —— */
header .search-section {
  padding: 10px 14px 12px;
  background: color-mix(in srgb, #0b1120 92%, #1e293b);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body.light-mode header .search-section {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

header .search-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

body.dark-mode header .search-container,
body.light-mode header .search-container {
  background: transparent;
  border: none;
  box-shadow: none;
}

header .search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 6px 6px 6px 14px;
  min-height: 48px;
  border-radius: 999px;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.light-mode header .search-bar {
  background: #ffffff;
  border-color: #e2e8f0;
}

header .search-bar:hover,
header .search-bar:focus-within {
  border-color: #4776e8;
  box-shadow: 0 0 0 3px color-mix(in srgb, #4776e8 20%, transparent);
  transform: none;
}

body.dark-mode header .search-bar {
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body.dark-mode header .search-bar:hover,
body.dark-mode header .search-bar:focus-within {
  border-color: #4776e8;
  box-shadow: 0 0 0 3px color-mix(in srgb, #4776e8 22%, transparent);
}

header .search-icon {
  margin: 0;
  font-size: 14px;
  color: #94a3b8;
  flex-shrink: 0;
}

body.dark-mode header .search-icon {
  color: #94a3b8;
}

header .search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
}

body.light-mode header .search-input {
  color: #0f172a;
}

header .search-input::placeholder {
  color: #64748b;
  font-weight: 400;
}

body.dark-mode header .search-input {
  color: #f1f5f9;
}

body.dark-mode header .search-input::placeholder {
  color: #64748b;
}

header .search-btn {
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #4776e8, #8e54e9);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: none;
  transition: filter 0.2s ease, transform 0.15s ease;
}

header .search-btn:hover,
body.dark-mode header .search-btn:hover {
  background: linear-gradient(135deg, #4776e8, #8e54e9);
  filter: brightness(1.08);
  transform: scale(1.03);
}

header .search-results {
  margin-top: 10px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #0f172a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body.light-mode header .search-results {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

header .results-table {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: none;
  overflow: visible;
}

.home-typeahead__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.home-typeahead__item:hover {
  background: color-mix(in srgb, #4776e8 16%, transparent);
}

.home-typeahead__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.25);
  flex-shrink: 0;
  padding: 2px;
  box-sizing: border-box;
}

.home-typeahead__logo--empty {
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #94a3b8;
  background: #1e293b;
}

.home-typeahead__text {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.home-typeahead__title {
  font-size: 13px;
  font-weight: 650;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-mode .home-typeahead__title {
  color: #0f172a;
}

.home-typeahead__type {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* In-page home app filter */
.home-app-search-miss,
[data-home-app-list].is-expanded > .home-app--extra.home-app-search-miss {
  display: none !important;
}

body.home-is-searching .home-load-more-wrap {
  display: none !important;
}

body.home-is-searching .home-category-block.home-search-empty,
body.home-is-searching .home-top-panels .tab-content.home-search-empty,
body.home-is-searching [data-home-app-list].home-search-empty {
  display: none !important;
}

body.home-is-searching .home-category-block.home-search-special-hit {
  order: -1;
}

.home-search-page-empty {
  max-width: 920px;
  margin: 0 auto 18px;
  padding: 0 16px;
  text-align: center;
  color: var(--hm-muted, #64748b);
  font-size: 14px;
}
