/* === MOBILE STYLES === */

.sws-search-icon a:hover,
.sws-search-icon a:focus {
  color: inherit !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  background-color: transparent !important;
}

.sws-search-icon .dashicons-search {
  line-height: inherit;
}

.sws-search-icon a.sws-temp-nav-link,
.sws-search-icon {
  pointer-events: auto !important;
  display: flex;
  border: 0 solid transparent;
}

.sf-menu > li.sws-search-icon {
  display: list-item !important;
  float: left !important;
  height: 74px !important;
  width: 43px !important;
  position: relative !important;
  border: none !important;
  vertical-align: baseline !important;
  list-style: none !important;
}

#sws-mobile-search {
  display: none;
  position: fixed;
  border-radius: 10px;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 9999;
  flex-direction: column;
  padding: 0;
  box-shadow: none;
}

#sws-mobile-search.active {
  display: flex;
  z-index: 999999;
}

#sws-mobile-form {
  margin-top: 80px;
  padding: 15px;
  flex-shrink: 0;
  background: transparent;
  z-index: 10;
  position: relative;
}

#sws-mobile-form input {
  width: 100% !important;
  padding: 12px !important;
  font-size: 16px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  background: transparent !important;
}

#sws-close {
  position: absolute;
  top: 100px;
  right: 25px;
  font-size: 22px;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  z-index: 11;
}

.sws-results {
  display: none;
  flex-grow: 1;
  overflow-y: auto;
  max-height: 70vh;
  padding: 10px 15px;
  background: #fff;
  margin-top: 10px;
}

/* Result entry layout */
.sws_ajax_search_entry.with_image {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  color: #000 !important;
  text-decoration: none !important;
  border-bottom: 1px solid #ddd;
}

.sws_ajax_search_image {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0 !important;
}

.sws_ajax_search_image img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #eee;
}

.sws_ajax_search_content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

.sws_ajax_search_title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  line-height: 1.4;
  width: 100%;
  display: block;
}

.ajax_search_info_line {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  line-height: 1.2;
  width: 100%;
}

.ajax_search_stock,
.ajax_search_price,
.ajax_search_details {
  display: inline-block;
  white-space: nowrap;
  font-weight: 500;
}

.ajax_search_stock {
  color: #007a00;
}

.ajax_search_price {
  color: #000;
}

.ajax_search_details {
  margin-left: auto;
  color: #ff6600;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.score-debug {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-size: 12px;
  color: #5D5D5D;
  line-height: 1.3;
}

/* === DESKTOP STYLES === */
@media (min-width: 769px) {
  #sws-desktop-search {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
	border-radius: 10px;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(255, 255, 255, 0.96);
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    padding: 0 10%;
  }

  #sws-desktop-search.active {
    display: flex;
  }

  #sws-desktop-search .search-container {
    width: 100%;
    max-width: 800px;
    margin: 25vh auto 0 auto;
  }

  #sws-desktop-search input[type="search"] {
    width: 100% !important;
    padding: 25px !important;
    font-size: 30px !important;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
  }

  #sws-desktop-search .sws-results {
    margin-top: 30px;
    max-height: 50vh;
    overflow-y: auto;
    font-family: inherit;
    font-size: 16px;
    color: #222;
  }

  #sws-desktop-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
  }

  #sws-desktop-search .sws_ajax_search_entry.with_image:hover .sws_ajax_search_title {
    text-decoration: underline;
  }
}

/* === SEARCH MORE LINK STYLES === */
.sws-search-more-wrapper {
  text-align: center;
  margin-top: 8px;
}

.sws-search-more-link {
  color: #f05a28 !important;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
}

.sws-search-more-link:hover {
  text-decoration: underline;
}

/* === SPINNER === */
.sws-spinner-wrapper {
  display: none;
  justify-content: center;
  padding: 10px 0;
}

.sws-spinner {
  animation: sws-rotate 2s linear infinite;
  width: 32px;
  height: 32px;
}

.sws-spinner .path {
  stroke: #e65100;
  stroke-linecap: round;
  animation: sws-dash 1.5s ease-in-out infinite;
}

@keyframes sws-rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes sws-dash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

/* === TEMP NAV === */
.sws-temp-nav-container {
  all: unset;
  display: inline;
}

.sws-temp-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.75rem;
}

.sws-temp-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 18px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.sws-temp-nav-link:hover {
  border-color: currentColor;
  background-color: rgba(0, 0, 0, 0.05);
}

.sws-selector-overlay:hover {
	background: rgba(255,140,0,0.4) !important;
}
.sws-original-hidden {
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
	padding: 0 !important;
	margin: 0 !important;
}
#sws-setup-controls {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 20px;
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 10px;
  font-family: sans-serif;
  font-size: 14px;
  max-width: 300px;
}

#sws-setup-controls strong {
  font-size: 16px;
  margin-bottom: 10px;
  display: block;
}

#sws-setup-controls label {
  display: inline-block;
  margin-bottom: 10px;
  cursor: pointer;
}

#sws-setup-controls input[type="radio"] {
  margin-right: 8px;
}

#sws-remove-inserted-search {
  display: block;
  width: 100%;
  margin-top: 15px;
  background: #e53935;
  color: #fff;
  border: none;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
  transition: background 0.2s ease-in-out;
}

#sws-remove-inserted-search:hover {
  background: #c62828;
}

#sws-exit-setup {
  margin-top: 12px;
  background: #757575;
  color: #fff;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
  width: 100%;
  font-weight: 500;
}

#sws-setup-message {
  margin-top: 10px;
  color: #007cba;
  font-weight: 500;
}

body.sws-setup-mode #sws-desktop-close {
	display: none !important;
}

body.sws-setup-mode .search-container {
	margin-top: 0 !important;
}