/*
 * Base styles copied from the Relevanssi Live Ajax Search plugin (assets/styles/style.css)
 * so they can be customized safely inside Allfix Ultimate Woo.
 */

/* === Relevanssi Live Ajax Search: base positioning styles (normally printed in wp_footer) === */
.relevanssi-live-search-results {
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
  -moz-transition: opacity 0.25s ease-in-out;
  -webkit-transition: opacity 0.25s ease-in-out;
  height: 0;
  overflow: hidden;
  z-index: 9999995; /* Exceed SearchWP Modal Search Form overlay. */
  position: absolute;
  display: none;
}

.relevanssi-live-search-results-showing {
  display: block;
  opacity: 1;
  height: auto;
  overflow: auto;
}

.relevanssi-live-search-no-results,
.relevanssi-live-search-didyoumean {
  padding: 0 1em;
}

/* === Relevanssi Live Ajax Search: default visual styles === */
.relevanssi-live-search-results {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  background: #fff;
  -webkit-box-shadow: 0 0 2px 0 rgba(30, 30, 30, 0.4);
  box-shadow: 0 0 2px 0 rgba(30, 30, 30, 0.4);
  border-radius: 3px;
  width: 315px;
  min-height: 175px;
  max-height: 300px;
}

.relevanssi-live-search-result p,
.relevanssi-live-search-result-status p {
  font-size: 0.9em;
  padding: 1em;
  margin: 0;
  border-bottom: 1px solid rgba(30, 30, 30, 0.1);
}

.relevanssi-live-search-result-status p {
  font-size: 0.8em;
  padding: 0 1em;
}

.relevanssi-live-search-result--focused {
  background: #ddd;
}

.relevanssi-live-search-result--focused a {
  color: #000;
}

.relevanssi-live-search-result:last-of-type p {
  border-bottom: 0;
}

/* Bullet proof Screen Reader Only text */
.relevanssi-live-search-instructions {
  border: 0 !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  -webkit-clip-path: inset(50%) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  width: 1px !important;
  white-space: nowrap !important;
}

.rlv-has-spinner {
  width: 56px;
  height: 56px;
  border: 8px solid #0052ec;
  border-right-color: transparent;
  border-radius: 50%;
  position: relative;
  animation: loader-rotate 1s linear infinite;
  margin: 1em auto;
}

.rlv-has-spinner::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #0052ec;
  border-radius: 50%;
  position: absolute;
  top: -1px;
  left: 33px;
}

@keyframes loader-rotate {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =====================================================================
   Allfix custom styles (safe to edit)
   ===================================================================== */
.rlv-search-wrapper .rlv-search-input {
  position: relative;
}

.rlv-search-wrapper .rlv-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.65;
  font-size: 18px;
  line-height: 1;
}

.rlv-search-wrapper input[type="search"].rlv-search-field {
  font-size: 16px;
  line-height: 1.2;
  padding: 12px 12px 12px 42px;
}
a.rlv-card__link {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.w-100 {
  width: 100%;
}

.relevanssi-live-search-result a {
  display: flex !important;
  color: #000;
}

.relevanssi-live-search-result a:hover {
  color: #000;
}

.rlv-search-wrapper {
  position: relative;
  margin: 0;
}

.rlv-search-wrapper #rlvlive_1 {
  position: relative;
}

.rlv-search-wrapper #rlvlive_1 .ajax-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card {
  width: 100%;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__link,
.rlv-search-wrapper .rlv-card__link,
.relevanssi-live-search-results .rlv-card__link {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 12px;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__left,
.rlv-search-wrapper .rlv-card__left,
.relevanssi-live-search-results .rlv-card__left {
  flex: 0 0 var(--afuw-rlv-left-size);
  width: var(--afuw-rlv-left-size);
  height: var(--afuw-rlv-left-size);
  margin-right: var(--afuw-rlv-left-mr);
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center;
  display: block;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__right {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__body {
  flex: 1 1 auto;
  min-width: 0;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__title {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__excerpt {
  margin-top: 3px;
  font-size: 0.92em;
  line-height: 1.25;
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__price {
  flex: 0 0 auto;
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}
.relevanssi-live-search-result.rlv-card {
    background-color: #f5f5f5;
    padding: 2px;
    margin: 5px;
}

.rlv-card__title {
    font-size: 16px;
    font-weight: 700;
}
span.woocommerce-Price-amount.amount {
    font-weight: 600;
}

.rlv-search-wrapper #rlvlive_1 .rlv-card__sku {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  opacity: 1;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}