/* ============================= */
/* PANEL COTIZACIÓN / CHAT       */
/* ============================= */

.cotizar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cotizar-overlay.active {
  display: block;
  opacity: 1;
}

.cotizar-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: white;
  z-index: 1101;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
}

.cotizar-panel.active {
  right: 0;
}

/* Header */
.cotizar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(135deg, #07152f, #0a1f44);
  color: white;
  flex-shrink: 0;
}

.cotizar-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cotizar-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}

.cotizar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.cotizar-nombre {
  font-weight: 700;
  font-size: 15px;
}

.cotizar-estado {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.cotizar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ed573;
  display: inline-block;
}

.cotizar-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.cotizar-close:hover {
  background: rgba(255,255,255,0.2);
}

.cotizar-close svg {
  width: 18px;
  height: 18px;
  stroke: white;
}

/* Chat area */
.cotizar-chat {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f4f7fb;
}

/* Burbujas */
.burbuja {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  animation: burbujaIn 0.3s ease;
}

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

.burbuja-bot {
  background: white;
  color: #1a2a44;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  align-self: flex-start;
}

.burbuja-bot strong {
  color: var(--azul-principal);
}

/* Typing indicator */
.burbuja-typing {
  background: white;
  padding: 14px 18px;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  align-self: flex-start;
  display: flex;
  gap: 5px;
  align-items: center;
}

.burbuja-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab;
  animation: typing 1.2s infinite;
}

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

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* Botón dentro del chat */
.burbuja-btn {
  margin-top: 10px;
  display: inline-block;
  padding: 9px 20px;
  background: var(--celeste-acento);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.burbuja-btn:hover {
  background: #009ed6;
  transform: translateY(-1px);
}

/* Formulario */
.cotizar-form-wrap {
  border-top: 1px solid #e8edf4;
  padding: 18px 16px 20px;
  background: white;
  flex-shrink: 0;
  max-height: 65vh;
  overflow-y: auto;
}

.cotizar-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cotizar-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cotizar-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--azul-principal);
  letter-spacing: 0.3px;
}

.cotizar-field input,
.cotizar-field textarea {
  padding: 10px 13px;
  border: 1.5px solid #dde4f0;
  border-radius: 10px;
  font-size: 14px;
  color: #1a2a44;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-family: inherit;
  resize: none;
}

.cotizar-field input:focus,
.cotizar-field textarea:focus {
  border-color: var(--celeste-acento);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.12);
}

.cotizar-submit {
  margin-top: 4px;
  padding: 13px;
  background: linear-gradient(135deg, #07152f, #0a1f44);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.2s;
}

.cotizar-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cotizar-submit svg {
  width: 17px;
  height: 17px;
  stroke: white;
}

/* Confirmación */
.cotizar-confirmacion {
  text-align: center;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cotizar-confirmacion svg {
  width: 48px;
  height: 48px;
  stroke: #2ed573;
}

.cotizar-confirmacion h4 {
  font-size: 17px;
  color: var(--azul-principal);
}

.cotizar-confirmacion p {
  font-size: 14px;
  color: var(--gris-texto);
}

/* Responsive */
@media (max-width: 480px) {
  .cotizar-panel {
    width: 100vw;
    right: -100vw;
  }
}
