/* ===================================================== */
/* Opskriftssøgning og hurtigfiltre - 2026-10-12         */
/* (module-recipe-search.html + js/recipe-search.js)     */
/* ===================================================== */

.recipe-search {
  max-width: 760px;
  margin: 10px auto 26px;
  text-align: left;
}

.recipe-search-field {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.recipe-search-field .fa-search {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-size: 16px;
  color: #36535B;
  pointer-events: none;
}

.recipe-search-field .recipe-search-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 18px 0 46px;
  font-size: 16px;
  color: #333;
  background: #fff;
  border: 2px solid #36535B;
  border-radius: 23px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.recipe-search-field .recipe-search-input:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(54, 83, 91, .15);
}

.recipe-search-chips {
  margin-top: 14px;
  text-align: center;
}

.recipe-search .recipe-chip {
  display: inline-block;
  margin: 0 3px 8px;
  padding: 7px 14px;
  font-size: 14px;
  line-height: 1.2;
  color: #36535B;
  background: #fff;
  border: 1px solid #d6c6c3;
  border-radius: 20px;
  cursor: pointer;
}

.recipe-search .recipe-chip:hover {
  border-color: #36535B;
}

.recipe-search .recipe-chip.is-active {
  color: #fff;
  background: #36535B;
  border-color: #36535B;
}

.recipe-search-results {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
}

.recipe-search-results[hidden] {
  display: none;
}

.recipe-search-results .rs-head {
  padding: 10px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #8a7f7b;
  background: #f7f2f1;
}

.recipe-search-results .rs-cats {
  padding: 10px 16px 4px;
  border-bottom: 1px solid #eee;
}

.recipe-search-results .rs-cats-title {
  margin-right: 6px;
  font-size: 13px;
  color: #777;
}

.recipe-search-results a.rs-cat {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 5px 12px;
  font-size: 13px;
  color: #36535B !important;
  text-decoration: none;
  background: #f4eeed;
  border-radius: 16px;
}

.recipe-search-results a.rs-cat:hover {
  background: #e9dfdd;
}

.recipe-search-results .rs-list {
  display: flex;
  flex-wrap: wrap;
}

.recipe-search-results a.rs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  line-height: 1.3;
  color: #333 !important;
  text-decoration: none;
}

.recipe-search-results a.rs-item:hover,
.recipe-search-results a.rs-item:focus {
  background: #f4eeed;
  text-decoration: none;
}

.recipe-search-results .rs-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #f6f6f6;
}

.recipe-search-results .rs-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.recipe-search-results .rs-go {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  color: #36535B;
  white-space: nowrap;
}

.recipe-search-results .rs-more {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #36535B;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.recipe-search-results .rs-more:hover {
  background: #f4eeed;
}

.recipe-search-results .rs-empty {
  padding: 14px 16px;
  color: #777;
}

.recipe-search-results a.rs-all {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  color: #36535B !important;
  text-decoration: none;
}

@media (min-width: 768px) {
  .recipe-search-results a.rs-item {
    width: 50%;
  }

  .recipe-search-results a.rs-item:nth-child(odd) {
    border-right: 1px solid #eee;
  }
}

@media (max-width: 767px) {
  .recipe-search {
    margin-bottom: 20px;
  }

  /* Hurtigfiltrene kan rulles sidelæns i én række på mobil */
  .recipe-search-chips {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 12px -15px 0;
    padding: 0 15px 4px;
    text-align: left;
    scrollbar-width: none;
  }

  .recipe-search-chips::-webkit-scrollbar {
    display: none;
  }

  .recipe-search .recipe-chip {
    flex: 0 0 auto;
    margin: 0 6px 0 0;
  }

  .recipe-search-results .rs-go {
    display: none;
  }
}
