/* =====================
   RESET & BASE
   ===================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

/* =====================
   ESCENA / FONDO
   ===================== */
.scene {
  position: relative;
  width: 100%;
  max-width: 1200px;
  user-select: none;
}

.scene img {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* =====================
   ACCESOS RÁPIDOS
   ===================== */
.accesos {
  position: absolute;
  bottom: 24px;
  right: 390px;
  background: rgba(26, 58, 107, 0.92);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(4px);
  min-width: 190px;
}

.accesos h4 {
  color: #c8960c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.acc-item {
  color: #fff;
  font-size: 11.5px;
  padding: 6px 0;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: color 0.15s;
}

.acc-item:last-child {
  border: none;
  padding-bottom: 0;
}

.acc-item:hover {
  color: #c8960c;
}

/* =====================
   CHAT WIDGET
   ===================== */
.chat-widget {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
}

/* Header */
.ch {
  background: #1a3a6b;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ch-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c8960c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.ch-name {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.ch-st {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.ch-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  display: inline-block;
}

.ch-close {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.6);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 4px;
  transition: all 0.15s;
}

.ch-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Mensajes */
.msgs {
  height: 260px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: #f7f7f5;
}

.msgs::-webkit-scrollbar {
  width: 4px;
}

.msgs::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.m {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  animation: fi 0.22s ease;
}

@keyframes fi {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.m.b { align-self: flex-start; }
.m.u { align-self: flex-end; }

.m .bb {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.6;
}

.m.b .bb {
  background: #fff;
  border: 0.5px solid #e0e0e0;
  color: #222;
  border-bottom-left-radius: 3px;
}

.m.u .bb {
  background: #1a3a6b;
  color: #fff;
  border-bottom-right-radius: 3px;
}

.m .t {
  font-size: 10px;
  color: #bbb;
  margin-top: 3px;
  padding: 0 3px;
}

.m.u .t {
  text-align: right;
}

/* Quick replies */
.qrs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.qb {
  background: #fff;
  border: 1.5px solid #1a3a6b;
  color: #1a3a6b;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: all 0.15s;
}

.qb:hover {
  background: #1a3a6b;
  color: #fff;
}

/* Typing indicator */
.tw {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 9px 13px;
  background: #fff;
  border: 0.5px solid #e0e0e0;
  border-radius: 14px;
  border-bottom-left-radius: 3px;
  width: fit-content;
}

.td {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1a3a6b;
  opacity: 0.3;
  animation: tb 1.2s infinite;
}

.td:nth-child(2) { animation-delay: 0.2s; }
.td:nth-child(3) { animation-delay: 0.4s; }

@keyframes tb {
  0%,  60%, 100% { transform: translateY(0);    opacity: 0.3; }
  30%             { transform: translateY(-4px); opacity: 1;   }
}

/* Input */
.inp-row {
  padding: 10px 12px;
  border-top: 1px solid #ebebeb;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
}

.ci {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 12.5px;
  outline: none;
  background: #f7f7f5;
  color: #222;
  font-family: 'Segoe UI', Arial, sans-serif;
  transition: border-color 0.15s;
}

.ci:focus {
  border-color: #1a3a6b;
}

.sb {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1a3a6b;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.sb:hover {
  background: #c8960c;
}

/* =====================
   BOTÓN MINIMIZADO
   ===================== */
.chat-bubble {
  position: absolute;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a3a6b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  border: 3px solid #c8960c;
  transition: transform 0.15s;
}

.chat-bubble:hover {
  transform: scale(1.08);
}

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #c8960c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
