/* =============================================
   DEMO AVACONT — Estilos específicos del tour
   ============================================= */

/* ── Welcome overlay ── */
#demo-welcome {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0029ff 0%, #001580 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #fff;
  text-align: center;
  padding: 24px;
  transition: opacity 0.5s ease;
}
#demo-welcome.fade-out {
  opacity: 0;
  pointer-events: none;
}
#demo-welcome img {
  width: 160px;
  margin-bottom: 28px;
  filter: brightness(0) invert(1);
}
#demo-welcome h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: #fff;
}
#demo-welcome p {
  font-size: 1rem;
  opacity: 0.85;
  max-width: 420px;
  margin: 0 0 32px;
  line-height: 1.6;
  color: #fff;
}
#demo-welcome .demo-features {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
#demo-welcome .demo-feature {
  background: rgba(255,255,255,0.12);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
#demo-welcome .btn-comenzar {
  background: #fff;
  color: #0029ff;
  border: none;
  border-radius: 50px;
  padding: 14px 40px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
#demo-welcome .btn-comenzar:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}

/* ── Demo banner ── */
#demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: linear-gradient(90deg, #0029ff, #6c5ce7);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  display: none;
}
#demo-banner i { font-size: 0.85rem; }
#demo-banner a {
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
}
body.demo-active {
  padding-top: 36px;
}

/* ── Highlight de elemento del tour ── */
.demo-step-highlight {
  outline: 3px solid #0029ff !important;
  outline-offset: 5px !important;
  border-radius: 10px !important;
  box-shadow: 0 0 0 6px rgba(0,41,255,0.12) !important;
  position: relative;
  z-index: 998 !important;
  transition: outline 0.3s, box-shadow 0.3s;
}

/* ── Tooltip del tour ── */
#demo-tooltip {
  position: fixed;
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  max-width: 300px;
  min-width: 260px;
  z-index: 9995;
  border: 1px solid rgba(0,41,255,0.1);
  animation: tooltipIn 0.25s ease;
}
@keyframes tooltipIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.demo-tooltip-step {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0029ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.demo-tooltip-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #020031;
  margin-bottom: 8px;
  line-height: 1.3;
}
.demo-tooltip-body {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 16px;
}
.demo-tooltip-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.demo-tooltip-skip {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: #999;
  cursor: pointer;
  padding: 4px 6px;
  transition: color 0.2s;
}
.demo-tooltip-skip:hover { color: #555; }
.demo-tooltip-next {
  background: #0029ff;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.demo-tooltip-next:hover {
  background: #001fcc;
  transform: translateY(-1px);
}
.demo-tooltip-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 1px solid rgba(0,41,255,0.1);
  transform: rotate(45deg);
}
.demo-tooltip-arrow.arrow-top {
  top: -7px;
  left: 50%;
  margin-left: -6px;
  border-right: none;
  border-bottom: none;
}
.demo-tooltip-arrow.arrow-bottom {
  bottom: -7px;
  left: 50%;
  margin-left: -6px;
  border-left: none;
  border-top: none;
}
.demo-tooltip-arrow.arrow-left {
  left: -7px;
  top: 50%;
  margin-top: -6px;
  border-right: none;
  border-top: none;
}
.demo-tooltip-arrow.arrow-right {
  right: -7px;
  top: 50%;
  margin-top: -6px;
  border-left: none;
  border-bottom: none;
}

/* ── Barra de progreso del tour ── */
.demo-progress-bar {
  height: 3px;
  background: #e8eaff;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.demo-progress-fill {
  height: 100%;
  background: #0029ff;
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* ── Overlay oscuro detrás del tooltip ── */
#demo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 997;
  display: none;
  pointer-events: none;
  transition: opacity 0.3s;
}
#demo-overlay.active { display: block; }

/* ── Fila demo cliente (animación de entrada) ── */
.demo-row-new {
  animation: rowSlideIn 0.5s ease forwards;
}
@keyframes rowSlideIn {
  from { opacity: 0; transform: translateX(-20px); background: rgba(0,41,255,0.06); }
  to   { opacity: 1; transform: translateX(0);    background: transparent; }
}

/* ── Badge pulsante en notificaciones ── */
.widget-badge.demo-pulse {
  animation: badgePulse 1s ease infinite;
}
@keyframes badgePulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

/* ── Notif row animada ── */
.demo-notif-in {
  animation: notifFadeIn 0.3s ease both;
}
@keyframes notifFadeIn {
  from { opacity: 0; transform: translateY(-6px); background: rgba(0,41,255,0.05); }
  to   { opacity: 1; transform: translateY(0);    background: transparent; }
}

/* ── Final CTA overlay ── */
#demo-cta {
  position: fixed;
  inset: 0;
  background: rgba(0,3,50,0.88);
  backdrop-filter: blur(6px);
  z-index: 99990;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 32px;
  color: #fff;
}
#demo-cta.show { display: flex; animation: ctaIn 0.5s ease; }
@keyframes ctaIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#demo-cta .cta-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: ctaBounce 1.5s ease infinite;
}
@keyframes ctaBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
#demo-cta h2 {
  font-size: 1.9rem;
  font-weight: 800;
  margin: 0 0 12px;
  color: #fff;
}
#demo-cta p {
  font-size: 1rem;
  opacity: 0.8;
  max-width: 480px;
  margin: 0 0 32px;
  line-height: 1.6;
  color: #fff;
}
#demo-cta .cta-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
#demo-cta .btn-cta-primary {
  background: #0029ff;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  box-shadow: 0 4px 20px rgba(0,41,255,0.4);
}
#demo-cta .btn-cta-primary:hover {
  background: #001fcc;
  transform: translateY(-2px);
}
#demo-cta .btn-cta-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
#demo-cta .btn-cta-secondary:hover { background: rgba(255,255,255,0.18); }
#demo-cta .cta-restart {
  margin-top: 20px;
  font-size: 0.8rem;
  opacity: 0.55;
  cursor: pointer;
  background: none;
  border: none;
  color: #fff;
  text-decoration: underline;
}

/* ── Spinner de carga inicial ── */
#demo-loading {
  position: fixed;
  inset: 0;
  background: #f5f7fb;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: #0029ff;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}
