/* ============================================================
   LEOSTUDIO — components/nudge.css
   Panel educativo "¿Qué es la IA aplicada?" (drawer lateral en
   desktop / bottom-sheet en mobile). Lo abre la mascota Leo
   (js/sections/solutions.js). Depende de: tokens.css. Bordes 1px.
   ============================================================ */

/* === PANEL EDUCATIVO === */

.ls-nudge-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.ls-nudge-panel.is-open {
  display: block;
}

.ls-nudge-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

/* Desktop: drawer lateral derecho */
.ls-nudge-panel__drawer {
  position: absolute;
  right: 0;
  top: var(--nav-height); /* respeta el header fijo, no lo tapa */
  bottom: 0;
  width: min(420px, 90vw);
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-dark);
  border-left: 1px solid rgba(123, 63, 228, 0.3);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 350ms ease-out;
}

.ls-nudge-panel.is-open .ls-nudge-panel__drawer {
  transform: translateX(0);
}

.ls-nudge-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.ls-nudge-panel__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-on-dark);
}

.ls-nudge-panel__close {
  flex-shrink: 0;
  padding: 4px;
  background: none;
  border: none;
  font-size: 1.125rem;
  color: rgba(250, 250, 251, 0.4);
  cursor: pointer;
}

.ls-nudge-panel__close:hover {
  color: var(--text-on-dark);
}

.ls-nudge-panel__body p,
.ls-nudge-panel__body li {
  margin-bottom: var(--space-sm);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(250, 250, 251, 0.75);
}

.ls-nudge-panel__body h3 {
  margin: var(--space-lg) 0 var(--space-xs);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--purple-soft);
}

.ls-nudge-panel__body ul {
  margin: 0;
  padding-left: var(--space-md);
}

/* Mobile: bottom sheet */
@media (max-width: 768px) {
  .ls-nudge-panel__drawer {
    right: 0;
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 80vh;
    border-left: none;
    border-top: 1px solid rgba(123, 63, 228, 0.3);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  .ls-nudge-panel.is-open .ls-nudge-panel__drawer {
    transform: translateY(0);
  }
}

/* === REDUCED MOTION === */

@media (prefers-reduced-motion: reduce) {
  .ls-nudge-panel__drawer {
    transition: none;
  }
}
