/**
 * nivel2.css
 * Estilos visuales de alta interactividad para ACTIVÁ IA - Nivel 2
 * UPATECO · Docente: Lucas Román
 */

/* =======================================================
   1. CONTENEDORES Y TIPOGRAFÍA DINÁMICA
   ======================================================= */
.n2-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  gap: 14px;
  overflow-y: auto;
  padding-right: 6px;
}

.n2-badge-nivel {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.n2-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: 100%;
}

.n2-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.n2-card {
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.n2-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.12);
}

.n2-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.n2-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =======================================================
   2. SELECTOR INTERACTIVO DE PROYECTO (CASOS SALTEÑOS)
   ======================================================= */
.project-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.case-btn-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.case-btn-card:hover {
  border-color: #38bdf8;
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.9);
}

.case-btn-card.active {
  border-color: #06b6d4;
  background: rgba(8, 47, 73, 0.7);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35);
}

.case-btn-card.active::before {
  content: '✓ PROYECTO ACTIVO';
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.case-icon-wrap {
  font-size: 24px;
  margin-bottom: 6px;
}

.case-client-name {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}

.case-location-tag {
  font-size: 11px;
  color: #94a3b8;
  display: block;
  margin-bottom: 4px;
}

.case-brief-desc {
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.35;
}

/* Panel de Detalles del Proyecto Seleccionado */
.project-dossier-panel {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dossier-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dossier-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #38bdf8;
}

.dossier-text {
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid #06b6d4;
}

.roadmap-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.roadmap-pill {
  font-size: 11px;
  padding: 4px 8px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #cbd5e1;
}

.roadmap-pill.current {
  background: rgba(6, 182, 212, 0.25);
  border-color: #06b6d4;
  color: #38bdf8;
  font-weight: 700;
}

/* =======================================================
   3. AUDITOR INTERACTIVO DE PROMPTS Y ALUCINACIONES
   ======================================================= */
.audit-workspace {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  height: 100%;
}

.audit-interactive-text {
  font-size: 14px;
  line-height: 1.7;
  color: #e2e8f0;
  background: rgba(10, 15, 29, 0.85);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.audit-claim {
  padding: 2px 6px;
  margin: 0 2px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  display: inline-block;
}

.audit-claim.unmarked {
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 2px dashed #94a3b8;
}

.audit-claim.unmarked:hover {
  background: rgba(56, 189, 248, 0.25);
}

.audit-claim.confirmed {
  background: rgba(34, 197, 94, 0.25);
  border: 1px solid #22c55e;
  color: #4ade80;
}

.audit-claim.pending {
  background: rgba(245, 158, 11, 0.25);
  border: 1px solid #f59e0b;
  color: #fbbf24;
}

.audit-claim.incompatible {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #f87171;
}

.audit-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audit-legend {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.legend-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.85;
}

.legend-badge.active, .legend-badge:hover {
  opacity: 1;
  transform: scale(1.03);
}

.legend-badge.conf { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid #22c55e; }
.legend-badge.pend { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #f59e0b; }
.legend-badge.incomp { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid #ef4444; }

.audit-score-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.audit-score-number {
  font-size: 28px;
  font-weight: 800;
  color: #38bdf8;
}

/* =======================================================
   4. ESTUDIO DE VIDEO GENERATIVO CON IA (CLASE 5 Y MÁS)
   ======================================================= */

.n2-teoria {
  align-content: start;
  gap: 12px;
}

.n2-teoria .n2-card h3,
.n2-estudio h3,
.n2-estudio h4 {
  color: #7dd3fc;
  margin: 0 0 6px;
  font-size: 1rem;
}

.n2-teoria .n2-card p,
.n2-estudio p {
  color: #e2e8f0;
  margin: 0 0 8px;
  font-size: clamp(.86rem, 1.25vw, 1.16rem);
  line-height: 1.45;
}

.n2-teoria-referencias,
.n2-estudio-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
}

.n2-teoria-referencias a,
.n2-estudio a {
  color: #7dd3fc;
  text-decoration: underline;
}

.n2-estudio-contenido {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.n2-estudio video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 56vh;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 10px;
}

.video-control-btn {
  background: #1e293b;
  border: 1px solid #64748b;
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 6px;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}

.video-control-btn:hover,
.video-control-btn:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}

.video-control-btn[aria-pressed="true"] {
  background: #7dd3fc;
  color: #020617;
}

@media (max-width: 760px) {
  .n2-estudio-contenido,
  .n2-teoria {
    grid-template-columns: 1fr;
  }
}

/* =======================================================
   4.B PAUSA ACTIVA CON FOTO DE LUCAS ROMÁN
   ======================================================= */
.break-slide-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  padding: 8px 16px;
}

.break-photo-frame {
  flex: 0 0 46%;
  max-width: 480px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #06b6d4;
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.25);
  background: #0b141a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.break-photo-img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.break-info-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =======================================================
   5. SIMULADOR DE CHAT Y ATENCIÓN POR WHATSAPP (CLASE 7)
   ======================================================= */
.whatsapp-sim-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  height: 100%;
}

.whatsapp-phone-mockup {
  background: #0b141a;
  border: 4px solid #334155;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
  height: 480px;
}

.wa-header {
  background: #202c33;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wa-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #06b6d4;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.wa-contact-info {
  flex: 1;
}

.wa-name {
  font-size: 13px;
  font-weight: 700;
  color: #e9edef;
}

.wa-status {
  font-size: 11px;
  color: #8696a0;
}

.wa-chat-body {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #0b141a;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 16px 16px;
}

.wa-bubble {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
  position: relative;
  word-break: break-word;
}

.wa-bubble.incoming {
  background: #202c33;
  color: #e9edef;
  align-self: flex-start;
  border-top-left-radius: 0;
}

.wa-bubble.outgoing {
  background: #005c4b;
  color: #e9edef;
  align-self: flex-end;
  border-top-right-radius: 0;
}

.wa-bubble-time {
  font-size: 9px;
  color: #8696a0;
  float: right;
  margin-top: 4px;
  margin-left: 8px;
}

.wa-input-row {
  background: #202c33;
  padding: 8px;
  display: flex;
  gap: 6px;
}

.wa-input {
  flex: 1;
  background: #2a3942;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  font-size: 12px;
}

.wa-send-btn {
  background: #00a884;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =======================================================
   6. CALCULADORA DE PRECIOS Y COSTOS (CLASE 6)
   ======================================================= */
.pricing-calc-box {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.calc-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.calc-input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 12px;
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 700;
}

.calc-result-card {
  background: rgba(8, 47, 73, 0.6);
  border: 1px solid #06b6d4;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

/* =======================================================
   7. RÚBRICA Y EVALUADOR DE 100 PUNTOS (CLASE 8)
   ======================================================= */
.rubric-n2-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.rubric-item-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rubric-item-check:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(56, 189, 248, 0.4);
}

.rubric-item-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #06b6d4;
  margin-top: 2px;
  cursor: pointer;
}

.rubric-item-info {
  flex: 1;
}

.rubric-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}

.rubric-item-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
}

.rubric-item-pts {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Botones de acción y utilidades */
.btn-n2 {
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-n2:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.35);
}

.btn-n2-secondary {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.btn-n2-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #fff;
}

/* Lectura proyectada y reproductor de Nivel 2 */
.nivel2-en-pantalla .slide-standard .slide-body { flex: 1 1 auto; min-height: 0; padding-bottom: 4rem; }
.nivel2-en-pantalla .n2-grid-2col { height: auto; align-items: start; }
.nivel2-en-pantalla .slide-body :is(p, li, td, th, label, .n2-card div)[style*="font-size"] { font-size: max(17px, 1em) !important; line-height: 1.5 !important; }
.nivel2-en-pantalla .slide-body :is(h3,h4,h5,strong)[style*="font-size"] { font-size: max(19px, 1em) !important; }
.n2-lectura { max-width: 78ch; margin: 0 auto 1.25em; font-size: clamp(19px, 1.7vw, 27px); line-height: 1.52; color: #edf2fa; }
.n2-lectura h3 { color: #87ddf8; font-size: 1.12em; margin: .3em 0; }
.n2-lectura h4 { color: #83e7bf; margin: .8em 0 .2em; }
.n2-lectura p { font-size: inherit; line-height: inherit; margin: 0 0 .5em; }
.n2-lectura a { color: #9ce0ff; font-size: .82em; }
.n2-estudio-contenido { display: flex; flex-direction: column; }
.n2-estudio-contenido video { width: 100%; height: clamp(220px, 49vh, 680px); object-fit: contain; background: #05070b; }
.n2-estudio-contenido .n2-card { width: 100%; box-sizing: border-box; }
.n2-estudio .video-control-btn, .n2-estudio p { font-size: max(16px,1rem); }
.n2-lectura:only-child > h3:first-child { display: none; }
