/* ════════════════════════════════════════════════════════════════
   buscador.css — Chat de búsqueda de errores · ElectroAvería
   Compartido por todas las páginas
   ════════════════════════════════════════════════════════════════ */

/* ── Chat overlay ───────────────────────────────────────────────── */
.chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4,10,18,0.92);
  backdrop-filter: blur(8px);
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.chat-overlay.open {
  display: flex;
  animation: chatSlideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(100px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-sheet {
  width: 100%;
  max-width: 480px;
  height: 88vh;
  background: rgba(18,28,40,0.97);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-left: 1px solid rgba(255,255,255,0.08);
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* ── Header ─────────────────────────────────────────────────────── */
.chat-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(27,51,80,0.6);
  flex-shrink: 0;
}
.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #6FD3FF;
  box-shadow: 0 0 12px rgba(111,211,255,0.4);
}
.chat-header-info { flex: 1; }
.chat-header-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: 1px; color: #fff;
}
.chat-header-status {
  font-size: 11px; color: #00e676;
  display: flex; align-items: center; gap: 5px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #00e676; box-shadow: 0 0 6px #00e676;
}
.chat-close {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(244,247,251,0.42);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
/* ── Mensajes ───────────────────────────────────────────────────── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { display: none; }

.msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  animation: msgIn 0.4s ease both;
  padding: 0 4px;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.msg.user { flex-direction: row-reverse; }
.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%; object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.msg-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  font-family: 'Exo 2', sans-serif;
}
.msg.bot .msg-bubble {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
  color: #F4F7FB;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.msg.user .msg-bubble {
  background: linear-gradient(180deg, rgba(111,211,255,0.14), rgba(111,211,255,0.08));
  border: 1px solid rgba(111,211,255,0.16);
  border-bottom-right-radius: 4px;
  color: #F4F7FB;
}
/* ── Input ──────────────────────────────────────────────────────── */
.chat-input-row {
  padding: 14px 16px 20px;
  display: flex; gap: 10px; align-items: center;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 12px 18px;
  font-family: 'Exo 2', sans-serif;
  font-size: 15px;
  color: #F4F7FB;
  outline: none;
  transition: all 0.3s ease;
}
.chat-input:focus {
  border-color: rgba(111,211,255,0.3);
  background: rgba(255,255,255,0.08);
}
.chat-input::placeholder { color: rgba(244,247,251,0.42); }
.chat-send {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, #6FD3FF, #8AA4FF);
  border: 1px solid rgba(111,211,255,0.16);
  color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(111,211,255,0.10);
  flex-shrink: 0;
  transition: all 0.2s;
  font-weight: 600;
}
.chat-send:active { transform: scale(0.92); }
.chat-scan-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  color: #F4F7FB; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chat-scan-btn:active { transform: scale(0.92); }
.chat-scan-btn:hover { border-color: rgba(111,211,255,0.3); background: rgba(255,255,255,0.08); }

/* ── Chips ──────────────────────────────────────────────────────── */
.quick-chips {
  display: flex; gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto; flex-shrink: 0;
}
.quick-chips::-webkit-scrollbar { display: none; }
.chip {
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #6FD3FF;
  white-space: nowrap;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
  font-weight: 500;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chip:active { background: rgba(111,211,255,0.14); border-color: #6FD3FF; }

/* ── Botones resultado ──────────────────────────────────────────── */
.chat-btn-row {
  display: flex; gap: 7px;
  margin-top: 12px; flex-wrap: wrap;
}
.chat-btn {
  flex: 1; min-width: 80px;
  padding: 9px 6px;
  border-radius: 10px; border: none;
  font-size: 12px; font-weight: 700;
  text-align: center; text-decoration: none;
  cursor: pointer; display: block;
  font-family: 'Exo 2', sans-serif;
  letter-spacing: 0.3px;
  transition: transform 0.15s, opacity 0.15s;
  line-height: 1.3;
}
.chat-btn:active { transform: scale(0.96); opacity: 0.85; }
.chat-btn-guia {
  background: linear-gradient(135deg, #0055aa, #0099cc);
  color: #fff; border: 1px solid rgba(0,200,255,0.3);
}
.chat-btn-diag {
  background: linear-gradient(135deg, #004422, #00884d);
  color: #fff; border: 1px solid rgba(0,200,100,0.3);
}
.chat-btn-amazon {
  background: linear-gradient(135deg, #b35c00, #ff9900);
  color: #111; border: 1px solid rgba(255,153,0,0.3);
}
.chat-btn-tecnico {
  background: linear-gradient(135deg, #7a0022, #d81b4a);
  color: #fff; border: 1px solid rgba(255,60,100,0.35);
}
.chat-tecnico-form {
  margin-top: 10px; padding: 12px; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
}
.chat-tecnico-form .form-input { margin-bottom: 8px; width: 100%; box-sizing: border-box; }
.chat-tecnico-form .form-submit { width: 100%; }

/* ── Modal CP (compartido) ──────────────────────────────────────── */
#wModal {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(7,11,17,0.88);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
#wModal-inner { width: 100%; max-width: 350px; }
#wBox {
  background: rgba(18,28,40,0.97);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 26px;
  max-width: 100%; margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.36);
}
#wHeader {
  background: linear-gradient(135deg, #0a1820 0%, #0f2535 100%);
  padding: 18px 16px 14px;
  text-align: center; position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
#wHeader::before {
  content: '';
  position: absolute; top: -30px; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 120px;
  background: radial-gradient(ellipse, rgba(111,211,255,0.12) 0%, transparent 70%);
}
#wBadge {
  display: inline-block;
  background: rgba(111,211,255,0.14);
  border: 1px solid rgba(111,211,255,0.16);
  border-radius: 14px; padding: 4px 11px;
  font-size: 9px; font-weight: 700;
  letter-spacing: 1px; color: #6FD3FF;
  text-transform: uppercase; margin-bottom: 8px; position: relative;
}
#wTitle {
  font-size: 26px; font-weight: 800;
  color: #F4F7FB; line-height: 1.2;
  margin: 0 0 5px; position: relative;
  font-family: 'Rajdhani', sans-serif;
}
#wTitle b { color: #6FD3FF; }
#wSub {
  font-size: 13px; color: rgba(244,247,251,0.72);
  position: relative; margin: 0; font-weight: 500;
}
#wBody { padding: 14px 13px 18px; }
.ws {
  display: table; width: 100%;
  background: rgba(111,211,255,0.14);
  border: 1px solid rgba(111,211,255,0.16);
  border-radius: 12px; padding: 11px 12px;
  margin-bottom: 7px; box-sizing: border-box;
  position: relative; overflow: hidden;
}
.ws::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #6FD3FF, #8AA4FF);
  border-radius: 3px 0 0 3px;
}
.ws-num { display: table-cell; width: 38px; vertical-align: middle; padding-left: 6px; }
.ws-num span {
  display: inline-block; width: 30px; height: 30px;
  border-radius: 50%; border: 2px solid #6FD3FF;
  background: rgba(111,211,255,0.14); color: #6FD3FF;
  font-size: 14px; font-weight: 800; text-align: center; line-height: 26px;
}
.ws-txt { display: table-cell; vertical-align: middle; padding-left: 11px; }
.ws-txt strong { display: block; font-size: 17px; font-weight: 800; color: #F4F7FB; line-height: 1.25; font-family: 'Rajdhani', sans-serif; }
.ws-txt small  { display: block; font-size: var(--fs-caption); color: rgba(244,247,251,0.72); margin-top: 3px; font-weight: 500; }
.ws-ico { display: table-cell; vertical-align: middle; width: 36px; font-size: 22px; text-align: right; opacity: 0.85; }
#wBtn {
  display: block; width: 100%; margin-top: 18px;
  background: linear-gradient(135deg, #0066bb, #00aadd);
  border: none; border-radius: 14px; padding: 17px;
  color: #fff; font-size: 16px; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; box-sizing: border-box;
  box-shadow: 0 4px 24px rgba(0,100,200,0.45);
}
