/* ============================================================
   EASY TRADING ACADEMY — Contact Widget flotante
   ============================================================ */


/* ── BOTÓN FLOTANTE ──────────────────────────────────────── */

.contact-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #0A0A0A;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(212, 160, 23, 0.4);
  transition: var(--transition);
}

.contact-fab:hover {
  background: var(--accent-hover);
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(212, 160, 23, 0.5);
}

.contact-fab svg {
  transition: var(--transition);
}

/* Cuando el panel está abierto, muestra la X */
.contact-fab .icon-chat  { display: block; }
.contact-fab .icon-close { display: none; }

.contact-fab.open .icon-chat  { display: none; }
.contact-fab.open .icon-close { display: block; }


/* ── PANEL ───────────────────────────────────────────────── */

.contact-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 199;
  width: 340px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;

  /* Estado inicial: oculto */
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  transform-origin: bottom right;
}

.contact-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}


/* ── CABECERA DEL PANEL ──────────────────────────────────── */

.contact-panel-header {
  background: linear-gradient(135deg, rgba(212,160,23,0.15), rgba(212,160,23,0.05));
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.contact-panel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #8B6914);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  color: #0A0A0A;
  flex-shrink: 0;
}

.contact-panel-info {
  flex: 1;
}

.contact-panel-info .name {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  line-height: 1.2;
}

.contact-panel-info .status {
  font-size: 12px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-panel-info .status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}


/* ── CUERPO DEL PANEL ────────────────────────────────────── */

.contact-panel-body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.contact-panel-body p {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}


/* ── CAMPOS DEL FORMULARIO ───────────────────────────────── */

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field label {
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font);
  font-size: var(--fs-small);
  color: var(--text-primary);
  transition: border-color 0.2s;
  resize: none;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--text-muted);
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-field textarea {
  height: 88px;
  line-height: 1.5;
}


/* ── BOTÓN ENVIAR ────────────────────────────────────────── */

.contact-panel-body .btn {
  margin-top: 4px;
}


/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 420px) {
  .contact-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 88px;
  }

  .contact-fab {
    right: 16px;
    bottom: 20px;
  }
}
