/* ==========================================================================
   SKM Search — ke_search-Overrides im SKM-Design
   ========================================================================== */

.skm-search-form {
  margin-bottom: 2rem;
}

.skm-search-form__fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.skm-search-form__box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  padding: 0.25rem 0.25rem 0.25rem 1rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.skm-search-form__box:focus-within {
  border-color: #09458d;
  box-shadow: 0 0 0 3px rgb(9 69 141 / 0.15);
}

.skm-search-form__icon {
  display: inline-flex;
  color: #6b7280;
}

.skm-search-form__input {
  flex-grow: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  padding: 0.75rem 0.5rem;
  color: #111827;
  min-width: 0;
}

.skm-search-form__submit {
  flex-shrink: 0;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
}

.skm-search-form__reset {
  display: inline-block;
  margin-top: 0.75rem;
  color: #6b7280;
  font-size: 0.875rem;
  text-decoration: underline;
}

.skm-search-form__reset:hover {
  color: #09458d;
}

/* Filters — dezent, oberhalb der Ergebnisliste */
.skm-search-filters {
  margin-top: 1.5rem;
  padding: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Result Cards
   -------------------------------------------------------------------------- */
#kesearch_results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.skm-search-result {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}

.skm-search-result:hover {
  border-color: #09458d;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.06);
  transform: translateY(-1px);
}

.skm-search-result__preview {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
}

.skm-search-result__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skm-search-result__body {
  flex-grow: 1;
  min-width: 0;
}

.skm-search-result__meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.skm-search-result__type-badge {
  display: inline-block;
  padding: 2px 10px;
  background: #ececfb;
  color: #09458d;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.75rem;
}

.skm-search-result--type-fux_products .skm-search-result__type-badge {
  background: #dcfce7;
  color: #16653e;
}

.skm-search-result--type-file .skm-search-result__type-badge {
  background: #fef3c7;
  color: #92400e;
}

.skm-search-result__url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

.skm-search-result__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  line-height: 1.35;
  color: #111827;
}

.skm-search-result__title a {
  color: inherit;
  text-decoration: none;
}

.skm-search-result__title a:hover {
  color: #09458d;
}

.skm-search-result__teaser {
  margin: 0;
  color: #4b5563;
  line-height: 1.55;
  font-size: 0.9375rem;
}

.skm-search-result__teaser em {
  background: rgb(9 69 141 / 0.12);
  color: #09458d;
  font-style: normal;
  font-weight: 600;
  padding: 0 2px;
  border-radius: 2px;
}

.skm-search-result__tags {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

/* --------------------------------------------------------------------------
   No Results
   -------------------------------------------------------------------------- */
.skm-search-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #6b7280;
}

.skm-search-empty__icon {
  color: #9ca3af;
  margin-bottom: 1rem;
}

.skm-search-empty__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: #111827;
}

.skm-search-empty__text {
  margin: 0;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 575.98px) {
  .skm-search-result {
    flex-direction: column;
  }

  .skm-search-result__preview {
    width: 100%;
    height: 180px;
  }

  .skm-search-form__submit span {
    display: none;
  }
}
