/* Costume Privé Paris — Guides search bar v1 */

.cp-guides-search {
  max-width: 720px;
  margin: 24px auto 40px;
  position: relative;
  z-index: 20;
}

.cp-guides-search__form {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e8e0d4;
  border-radius: 12px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  overflow: hidden;
}

.cp-guides-search__form:focus-within {
  border-color: #c9a96e;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.cp-guides-search__icon {
  width: 20px;
  height: 20px;
  color: #a17738;
  margin-left: 18px;
  flex-shrink: 0;
}

.cp-guides-search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 18px 16px;
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  color: #1a1a2e;
}

.cp-guides-search__input::placeholder {
  color: #94908a;
  font-style: italic;
}

.cp-guides-search__clear {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #94908a;
  padding: 12px 16px;
  font-size: 20px;
  line-height: 1;
  display: none;
}

.cp-guides-search__clear.is-visible {
  display: block;
}

.cp-guides-search__clear:hover {
  color: #1a1a2e;
}

/* Results dropdown */
.cp-guides-search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e8e0d4;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(26, 26, 46, 0.12);
  max-height: 480px;
  overflow-y: auto;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.cp-guides-search__results.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.cp-guides-search__result {
  display: block;
  padding: 16px 22px;
  border-bottom: 1px solid #f5f1ea;
  text-decoration: none;
  color: inherit;
  transition: background 150ms ease;
}

.cp-guides-search__result:hover,
.cp-guides-search__result:focus,
.cp-guides-search__result.is-active {
  background: #fafaf9;
  color: inherit;
  text-decoration: none;
}

.cp-guides-search__result:last-child {
  border-bottom: none;
}

.cp-guides-search__category {
  display: inline-block;
  background: rgba(201, 169, 110, 0.15);
  color: #a17738;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.cp-guides-search__title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.3;
  margin: 0 0 4px 0;
}

.cp-guides-search__excerpt {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  color: #6b6b6b;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-guides-search__highlight {
  background: rgba(201, 169, 110, 0.25);
  color: #1a1a2e;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.cp-guides-search__empty,
.cp-guides-search__loading {
  padding: 28px;
  text-align: center;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  color: #6b6b6b;
  font-style: italic;
}

.cp-guides-search__footer {
  padding: 12px 22px;
  background: #fafaf9;
  border-top: 1px solid #e8e0d4;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  color: #6b6b6b;
  text-align: center;
}

.cp-guides-search__footer kbd {
  background: #ffffff;
  border: 1px solid #e8e0d4;
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  color: #1a1a2e;
}

@media (max-width: 768px) {
  .cp-guides-search {
    margin: 16px 0 24px;
  }
  .cp-guides-search__input {
    font-size: 15px;
    padding: 14px 12px;
  }
}
