/* Overlay */
#clsvc-search-overlay {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 80%;
  max-height: 600px;
  background: #fff;
  box-shadow: 0 -6px 25px rgba(0,0,0,0.15);
  border-radius: 12px 12px 0 0;
  transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#clsvc-search-overlay.active {
  bottom: 0;
}

body.clsvc-search-open {
  overflow: hidden;
}


/* Header */
.clsvc-search-header {
  display: flex;
  align-items: center;
  padding: 15px 15px;;
}

#clsvc-live-search-input {
    flex: 1;
    padding: 9px 9px;
    font-size: 15px;
    border: 1px solid #000;
    border-radius: 7px;
    outline: none;
    transition: border .2s, box-shadow .2s;
}

#clsvc-live-search-input:focus {
   border-color: #6200ee;
   box-shadow: 0 0 8px rgb(115 35 221 / 68%);
}

#clsvc-close-search {
    font-size: 20px;
    background: #fb0000;
    line-height: normal;
    border: none;
    cursor: pointer;
    margin-left: 18px;
    color: #fff;
    transition: background .2s, transform .2s;
}

#clsvc-close-search:hover {
  background: #cc0b0b;
  color: #ffffff;
}

/* Results */
#clsvc-live-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 5px;
}

/* Result items */
.clsvc-live-result-item {
  display: flex;
  align-items: center;
  padding:10px 10px;
  margin-top: 10px;
  gap: 12px;
  text-decoration: none;
  color: #333;
  transition: box-shadow 0.2s, border-radius 0.2s;
  border-bottom: 1px solid #f5f5f5;
}

.clsvc-live-result-img
 {
    display: contents;
}

#clsvc-default-categories {
    margin-top: 20px;
}

#clsvc-default-categories a {
    padding: 12px 20px;
    background: linear-gradient(-180deg, #5d00d7, #3300bd);
    box-shadow: rgba(0, 0, 0, 0.1) 0 4px 10px;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border-radius: 5px;
	transition: box-shadow 0.2s ease-in-out;
}

#clsvc-default-categories {
	padding: 0 10px;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    display: flex;
    justify-content: center;
}

#clsvc-default-categories a:hover,
#clsvc-default-categories a:focus{
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #6200ee;
}

.clsvc-live-result-item:hover,
.clsvc-live-result-item[aria-selected="true"],
.clsvc-live-result-item.selected {
  box-shadow: 0 0 5px #6200ee;
  border-radius: 7px;
}

.clsvc-live-result-img img {
    width: 80px;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    transition: transform .2s;
}

.clsvc-live-result-title {
  font-size: 15px;
  line-height: 1.4;
  display: block;
  text-align: left;
	color: #6200ee;
  transition: color 0.2s;
}

/* No results / loading */
.clsvc-no-result, .clsvc-loading {
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 14px;
    color: #000000;
}

.clsvc-loading{
	display: flex;
	align-items: center;
	justify-content: center;
}

.liveSearchSpinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3; /* light gray */
    border-top: 4px solid #6200ee; /* blue color */
    border-radius: 50%;
    animation: liveSpin 1s linear infinite;
}

@keyframes liveSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Highlighted text */
.clsvc-live-result-title mark {
  background: #5dff9e;
  color: #000;
  border-radius: 2px;
  padding: 0 2px;
}

/* Responsive */
@media (max-width: 768px) {
  #clsvc-search-overlay {
    height: 100%;
    border-radius: 0;
  }
}
