/* app-aprendex.css
   CSS mínimo para AprendeX dentro de CualityX.
   (No rompe tu sistema de ventanas: todo está namespaced con #win-aprendex / .ax-*)
*/

/* ---------- Root + Scroll ---------- */
#win-aprendex {
  --ax-bg: rgba(18, 18, 26, 0.86);
  --ax-panel: rgba(255, 255, 255, 0.04);
  --ax-panel-2: rgba(255, 255, 255, 0.03);
  --ax-border: rgba(255, 255, 255, 0.10);
  --ax-border-2: rgba(255, 255, 255, 0.06);
  --ax-text: rgba(255, 255, 255, 0.92);
  --ax-muted: rgba(255, 255, 255, 0.65);
  --ax-blue: #2563eb;
  --ax-green: #22c55e;
  --ax-amber: #f59e0b;
  --ax-red: #ef4444;
  --ax-radius: 18px;
  --ax-radius-md: 14px;
  --ax-radius-sm: 12px;
  --ax-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --ax-shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.28);
}

#win-aprendex .content {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#win-aprendex * {
  box-sizing: border-box;
}

#win-aprendex ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
#win-aprendex ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}
#win-aprendex ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.10);
}

/* ---------- Sidebar ---------- */
#win-aprendex #ax-sidebar {
  user-select: none;
}

#win-aprendex #ax-sidebar input,
#win-aprendex #ax-sidebar select,
#win-aprendex #ax-sidebar textarea {
  user-select: text;
}

#win-aprendex .ax-nav-item {
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, opacity 140ms ease;
  border: 1px solid transparent;
  color: var(--ax-text);
  background: transparent;
}

#win-aprendex .ax-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

#win-aprendex .ax-active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.10);
}

#win-aprendex .ax-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.10);
}

/* ---------- Buttons (generic) ---------- */
#win-aprendex button {
  transition: transform 140ms ease, opacity 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

#win-aprendex button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

#win-aprendex button:active {
  transform: translateY(0px) scale(0.99);
  opacity: 0.95;
}

/* ---------- Cards ---------- */
#win-aprendex .ax-card {
  border: 1px solid var(--ax-border);
  border-radius: var(--ax-radius);
  background: var(--ax-panel);
  box-shadow: var(--ax-shadow-soft);
}

#win-aprendex .ax-card.soft {
  background: var(--ax-panel-2);
}

/* ---------- Modal ---------- */
#win-aprendex #ax-modal {
  animation: axFadeIn 160ms ease;
}

#win-aprendex #ax-modal > div {
  box-shadow: var(--ax-shadow);
}

@keyframes axFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- ADN list items ---------- */
#win-aprendex .ax-doc-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
  border-radius: var(--ax-radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

#win-aprendex .ax-doc-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

#win-aprendex .ax-doc-item.ax-selected {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.10);
}

#win-aprendex .ax-doc-meta {
  font-size: 12px;
  opacity: 0.75;
}

#win-aprendex .ax-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 800;
  opacity: 0.9;
}

/* ---------- Quiz ---------- */
#win-aprendex .ax-option {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--ax-radius-md);
  padding: 12px 12px;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

#win-aprendex .ax-option:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

#win-aprendex .ax-option.ax-picked {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.10);
}

#win-aprendex .ax-option.ax-correct {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
}

#win-aprendex .ax-option.ax-wrong {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.10);
}

/* ---------- Leaderboard rows ---------- */
#win-aprendex .ax-lead-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
  border-radius: var(--ax-radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#win-aprendex .ax-rank {
  font-weight: 1000;
  width: 18px;
  opacity: 0.9;
}

#win-aprendex .ax-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

#win-aprendex .ax-dot.gold { background: rgba(245, 158, 11, 0.95); }
#win-aprendex .ax-dot.blue { background: rgba(37, 99, 235, 0.95); }
#win-aprendex .ax-dot.green { background: rgba(34, 197, 94, 0.95); }
#win-aprendex .ax-dot.pink { background: rgba(236, 72, 153, 0.95); }

#win-aprendex .ax-lead-name {
  font-weight: 900;
  font-size: 12px;
}
#win-aprendex .ax-lead-sub {
  font-size: 11px;
  opacity: 0.70;
}
#win-aprendex .ax-lead-xp {
  margin-left: auto;
  font-weight: 1000;
  opacity: 0.9;
}

/* ---------- Mood log ---------- */
#win-aprendex .ax-mood-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--ax-radius-md);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

#win-aprendex .ax-mood-emoji {
  font-size: 18px;
  line-height: 1;
}

#win-aprendex .ax-mood-time {
  font-size: 11px;
  opacity: 0.65;
  margin-left: auto;
  white-space: nowrap;
}

/* ---------- Responsive inside window ---------- */
@media (max-width: 980px) {
  #win-aprendex #ax-sidebar {
    width: 240px !important;
    min-width: 240px !important;
  }
}

@media (max-width: 820px) {
  #win-aprendex .content {
    flex-direction: column;
  }
  #win-aprendex #ax-sidebar {
    width: 100% !important;
    min-width: 100% !important;
    max-height: 240px;
  }
}
