/* ── Chat Search Panel ────────────────────────────────────────────────────
   Panel de búsqueda de servicios que se abre desde el widget IA·Asistente.
   Depende del posicionamiento fixed de .chat-widget (z-index 400).
   ─────────────────────────────────────────────────────────────────────── */

.csp {
  width: 320px;
  max-height: 480px;
  background: #1a1a1a;
  border: 1px solid rgba(43,168,178,0.5);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  display: none;           /* sin display:none ocupa espacio aunque sea invisible */
  flex-direction: column;
  overflow: hidden;
}
.csp.is-visible {
  display: flex;
  animation: cspIn .2s ease both;
}
@keyframes cspIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Campo de búsqueda */
.csp__search-wrap {
  padding: 10px 12px;
  flex-shrink: 0;
}
.csp__input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(43,168,178,0.35);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  font-family: var(--font-body, sans-serif);
  transition: border-color .15s;
}
.csp__input::placeholder { color: rgba(255,255,255,0.35); }
.csp__input:focus { border-color: rgba(43,168,178,0.75); }

/* Lista de resultados */
.csp__results {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(43,168,178,0.3) transparent;
}
.csp__results::-webkit-scrollbar { width: 4px; }
.csp__results::-webkit-scrollbar-thumb { background: rgba(43,168,178,0.3); border-radius: 4px; }

/* Item de resultado */
.csp__item {
  display: block;
  padding: 10px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background .15s;
  cursor: pointer;
}
.csp__item:last-child { border-bottom: none; }
.csp__item:hover { background: rgba(43,168,178,0.1); }
.csp__item-cat {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(43,168,178,0.85);
  font-family: var(--font-body, sans-serif);
  margin-bottom: 2px;
}
.csp__item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-body, sans-serif);
  margin-bottom: 3px;
}
.csp__item-desc {
  display: block;
  font-size: 11.5px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  font-family: var(--font-body, sans-serif);
}
.csp__item:hover .csp__item-desc { color: rgba(255,255,255,0.75); }

/* Sin resultados */
.csp__empty {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 20px 12px;
  font-family: var(--font-body, sans-serif);
}
.csp__empty a { color: rgba(43,168,178,0.9); text-decoration: underline; }

/* Tarjeta de contacto (intención detectada) */
.csp__contact-card {
  margin: 6px 8px 4px;
  padding: 12px 14px;
  background: rgba(227,6,19,0.1);
  border: 1px solid rgba(227,6,19,0.4);
  border-radius: 10px;
}
.csp__contact-card__label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ff6b6b;
  font-family: var(--font-body, sans-serif);
  margin-bottom: 4px;
}
.csp__contact-card__text {
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  margin: 0 0 10px;
  line-height: 1.5;
  font-family: var(--font-body, sans-serif);
}
.csp__contact-card__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.csp__contact-card__btn {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  padding: 6px 11px;
  text-decoration: none;
  font-family: var(--font-body, sans-serif);
  transition: background .15s, color .15s;
}
.csp__contact-card__btn--form {
  background: var(--rojo-acento, #e30613);
  color: #fff;
}
.csp__contact-card__btn--form:hover { background: #b8050f; }
.csp__contact-card__btn--email {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
}
.csp__contact-card__btn--email:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

/* CTA de contacto */
.csp__cta {
  display: block;
  margin: 8px 12px 12px;
  padding: 10px 14px;
  background: var(--rojo-acento, #e30613);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  letter-spacing: 0.03em;
  font-family: var(--font-body, sans-serif);
  flex-shrink: 0;
  transition: background .2s;
}
.csp__cta:hover { background: #b8050f; }

@media (max-width: 360px) {
  .csp { width: calc(100vw - 32px); }
}
