.cps-es {
  position: relative;
  width: 100%;
  max-width: 520px;
  font-family: inherit;
}

.cps-es__inputWrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.cps-es__icon {
  opacity: 0.7;
  line-height: 1;
}

.cps-es__input {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 14px;
  background: transparent;
  padding: 0;
  margin: 0;
}

.cps-es__clear {
  border: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
  font-size: 16px;
  line-height: 1;
}

.cps-es__clear.is-visible {
  opacity: 0.7;
  pointer-events: auto;
}

.cps-es__clear:hover {
  opacity: 1;
}

.cps-es__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 9999;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  display: none;
}

.cps-es__dropdown.is-open {
  display: block;
}

.cps-es__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.cps-es__item:last-child {
  border-bottom: 0;
}

.cps-es__item:hover,
.cps-es__item.is-active {
  background: rgba(0,0,0,0.035);
}

.cps-es__thumb {
  width: 44px;
  height: auto;
  aspect-ratio: 1/1;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(0,0,0,0.04);
  display: block;
}

.cps-es__thumb--placeholder {
  display: block;
}

.cps-es__meta {
  min-width: 0;
}

.cps-es__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 4px;
  word-break: break-word;
}

.cps-es__excerpt {
  font-size: 12.5px;
  opacity: 0.8;
  line-height: 1.25;
  word-break: break-word;
}

/* Ensure the input doesn't draw its own (often white) background inside the styled container */
.cps-es__input {
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

/* Remove iOS/Safari inner shadow quirks */
.cps-es__input::-webkit-search-decoration,
.cps-es__input::-webkit-search-cancel-button,
.cps-es__input::-webkit-search-results-button,
.cps-es__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
}

/* Force input to visually merge with the container (override theme input styles) */
.cps-es__input {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

.cps-es__inputWrap {
  background-clip: padding-box;
}

/* Fully reset native input chrome so container controls visuals */
.cps-es__input {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  outline: none !important;
  padding: 0 !important;
}

/* Theme override hardening: some themes set input[type="search"] padding-left with !important.
   Increase specificity and explicitly zero out all paddings. */
.cps-es input.cps-es__input[type="search"],
.cps-es .cps-es__input {
  padding: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 0 !important;
  background-color: transparent !important;
}



/* Alignment helper classes (set via Elementor control) */
.cps-es-align-center .cps-es { margin-left: auto; margin-right: auto; }
.cps-es-align-right  .cps-es { margin-left: auto; margin-right: 0; }
.cps-es-align-left   .cps-es { margin-left: 0; margin-right: auto; }
