/* -------------------------------------------------------------
 * Search bar AJAX results
 * File: woocommerce/search-bar-results.css
 * Scope: inside #gp-search modal
 * ---------------------------------------------------------- */

.rg-search-results {
  margin-top: 12px;
  max-height: 70vh;
  overflow-y: auto;
  background: #f4f4f6;
  border-radius: 8px;
  padding: 6px 0;
  display: none;
}

.rg-search-results.is-active {
  display: block;
}

.rg-search-loading,
.rg-search-no-results {
  padding: 12px 16px;
  font-size: 14px;
  color: #555;
}

/* Single result row */
.rg-search-result {
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: #111;
  align-items: center;
}

.rg-search-result:hover {
  background: #e9eef5;
}

.rg-search-result__image {
  flex: 0 0 52px;
}

.rg-search-thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #ddd;
}

.rg-search-thumb--placeholder {
  background: #eee;
}

/* Content */
.rg-search-result__content {
  flex: 1 1 auto;
  min-width: 0;
}

.rg-search-result__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.rg-search-result__meta {
  font-size: 11px;
  color: #555;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 4px;
}

.rg-meta-item::before {
  content: "";
}

/* Price & stock line */
.rg-search-result__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rg-search-result__price {
  font-size: 13px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.rg-price--regular del {
  color: #999;
  font-size: 12px;
}

.rg-price--current {
  font-weight: 700;
  color: #111;
}

.rg-price--discount {
  font-size: 11px;
  font-weight: 600;
  color: #c0392b;
}

/* Stock status */
.rg-search-result__stock {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.rg-stock--instock {
  color: #1e7e34;
  border-color: #1e7e34;
  background: #e6f4ea;
}

.rg-stock--oos {
  color: #a00;
  border-color: #a00;
  background: #fceaea;
}

.rg-stock--backorder {
  color: #8a6d3b;
  border-color: #8a6d3b;
  background: #fff7e6;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .rg-search-result__title {
    font-size: 13px;
  }

  .rg-search-result__price {
    font-size: 12px;
  }

  .rg-search-result__stock {
    display: none; /* optional on tiny screens */
  }
}

.rg-search-more {
  display: block;
  text-align: center;
  padding: 8px 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #3366cc;
  text-decoration: none;
  border-top: 1px solid #ddd;
}

.rg-search-more:hover {
  background: #e9eef5;
  text-decoration: underline;
}