/* ============================================================
   contacto.css — Sección Contáctanos + Chat 24/7
   Ilios Vounó — estética liquid glass premium
   ============================================================ */

/* ── Sección base ── */
.contacto {
  padding: var(--space-10) 0 var(--space-16);
  position: relative;
  z-index: var(--z-content);
}

.contacto__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

/* ── Layout: form + chat side by side ── */
.contacto__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 768px) {
  .contacto__layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    align-items: start;
  }
}

/* ══════════════════════════════════════════════
   FORMULARIO — Liquid Glass
   ══════════════════════════════════════════════ */
.contacto__form-wrap,
.contacto__chat-wrap {
  /* Liquid Glass panel */
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  box-shadow:
    0 8px 48px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}

/* Brillo superior sutil */
.contacto__form-wrap::before,
.contacto__chat-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  pointer-events: none;
}

.contacto__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.contacto__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 479px) {
  .contacto__row {
    grid-template-columns: 1fr;
  }
}

.contacto__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contacto__label {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.contacto__input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.90);
  outline: none;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
  -webkit-appearance: none;
}

.contacto__input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.contacto__input:focus {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.contacto__textarea {
  resize: none;
  min-height: unset;
  height: 72px;        /* ~3 renglones */
  max-height: 72px;
  overflow-y: auto;
  line-height: 1.6;
}

/* ── Botón Enviar ── */
.contacto__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.90);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 13px 32px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow:
    0 4px 20px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.14);
  margin-top: var(--space-1);
  align-self: flex-end;
}

.contacto__submit:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.20);
}

.contacto__submit:active {
  transform: translateY(0);
}

.contacto__success {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(180, 255, 180, 0.85);
  text-align: center;
  min-height: 20px;
  transition: opacity 0.3s ease;
}

/* ══════════════════════════════════════════════
   ELI — Tarjeta de entrada al chat widget
   ══════════════════════════════════════════════ */
.contacto__eli-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 100%;
  min-height: 280px;
  text-align: center;
}

/* Avatar centrado grande */
.contacto__eli-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}

.contacto__eli-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b4a20, #c47843);
  border: 1px solid rgba(232, 168, 130, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  box-shadow:
    0 6px 28px rgba(139, 74, 32, 0.5),
    0 0 0 6px rgba(196, 120, 67, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.contacto__eli-name {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(232, 168, 130, 0.6);
  margin: 0;
}

/* Botón CTA */
.contacto__eli-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, rgba(139, 74, 32, 0.85), rgba(196, 120, 67, 0.85));
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 168, 130, 0.28);
  border-radius: 999px;
  padding: 14px 32px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease;
  box-shadow:
    0 4px 22px rgba(139, 74, 32, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.contacto__eli-cta:hover {
  background: linear-gradient(135deg, rgba(139, 74, 32, 1), rgba(196, 120, 67, 1));
  border-color: rgba(232, 168, 130, 0.5);
  transform: translateY(-2px);
  box-shadow:
    0 8px 34px rgba(196, 120, 67, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.contacto__eli-cta:active {
  transform: translateY(0);
}

.contacto__eli-cta svg {
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   CHAT 24/7 (legacy — mantenido para referencia)
   ══════════════════════════════════════════════ */
.contacto__chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 360px;
}

/* ── Header del chat ── */
.contacto__chat-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--space-5);
}

.contacto__chat-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.contacto__chat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4eff91;
  box-shadow: 0 0 8px rgba(78, 255, 145, 0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.contacto__chat-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.05em;
}

/* ── Mensajes ── */
.contacto__chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
  padding-right: 4px;
  max-height: 230px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.10) transparent;
}
.contacto__chat-messages::-webkit-scrollbar { width: 2px; }
.contacto__chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 1px; }

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
}

.chat-msg--user {
  flex-direction: row-reverse;
}

.chat-msg__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.70);
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.chat-msg__bubble {
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-msg--agent .chat-msg__bubble {
  align-items: flex-start;
}
.chat-msg--user .chat-msg__bubble {
  align-items: flex-end;
}

.chat-msg__bubble p {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px 12px 12px 3px;
  padding: 9px 13px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin: 0;
}

.chat-msg--user .chat-msg__bubble p {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.20);
  border-radius: 12px 12px 3px 12px;
  color: rgba(255, 255, 255, 0.95);
}

.chat-msg__time {
  font-family: var(--font-body);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.08em;
  padding: 0 4px;
}

/* ── Input del chat ── */
.contacto__chat-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contacto__chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.88);
  outline: none;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
}

.contacto__chat-input::placeholder {
  color: rgba(255, 255, 255, 0.22);
}

.contacto__chat-input:focus {
  border-color: rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.09);
}

.contacto__chat-send {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.80);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.contacto__chat-send:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  transform: scale(1.08);
}

.contacto__chat-send:active {
  transform: scale(0.95);
}

/* ── Typing indicator ── */
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px 12px 12px 3px;
  width: fit-content;
}

.chat-typing span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
  animation: typing-bounce 1.2s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

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