/* ==========================================================================
   SIPANDAI-21 - LABORATORIUM VIRTUAL INFORMATIKA & KKA FASE D
   Mobile-First & Touch-Optimized Stylesheet (SMPN 21 Dumai)
   ========================================================================== */

/* 1. Container & Layout Responsif */
.inf-lab-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 0.25rem;
  font-family: inherit;
}

@media (max-width: 768px) {
  .inf-lab-container {
    padding: 0.25rem;
    gap: 1rem;
  }
}

/* Header & Banner Lab */
.inf-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #172554 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  padding: 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
}

.inf-hero-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.inf-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.6rem;
}

.inf-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #38bdf8;
  animation: infPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes infPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* 2. Filter Elemen Kurikulum (Horizontal Touch Scroll untuk HP) */
.inf-elemen-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.inf-elemen-nav::-webkit-scrollbar {
  display: none;
}

.inf-elemen-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--bg-surface, #ffffff);
  color: var(--text-muted, #64748b);
  border: 1px solid var(--border-color, #e2e8f0);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.inf-elemen-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.3);
}

.inf-elemen-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* 3. Grid Bab & Modul Pembelajaran */
.inf-modul-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

@media (max-width: 640px) {
  .inf-modul-grid {
    grid-template-columns: 1fr;
  }
}

.inf-modul-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.inf-modul-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: #818cf8;
}

.inf-modul-card.active {
  border-color: #4f46e5;
  background: rgba(99, 102, 241, 0.03);
  ring: 2px solid #4f46e5;
}

/* 4. Detail Modul: Tabs & Konten */
.inf-tabs-row {
  display: flex;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
  margin-bottom: 1rem;
  gap: 0.25rem;
}

.inf-tab-button {
  flex: 1;
  padding: 0.75rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.inf-tab-button.active {
  color: #4f46e5;
  font-weight: 700;
}

.inf-tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #4f46e5;
  border-radius: 2px;
}

/* 5. Mobile Live Code Runner (Playground) */
.inf-code-panel {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.inf-code-toolbar {
  background: #111827;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1f2937;
  color: #94a3b8;
  font-size: 0.75rem;
  font-family: monospace;
}

.inf-code-editor {
  width: 100%;
  background: #090d16;
  color: #e2e8f0;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  padding: 0.85rem;
  border: none;
  resize: vertical;
  min-height: 150px;
  outline: none;
  tab-size: 2;
}

/* Virtual Quick Access Bar untuk Keyboard Smartphone */
.inf-quick-key-bar {
  background: #1e293b;
  padding: 0.35rem 0.5rem;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  border-top: 1px solid #334155;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.inf-quick-key-bar::-webkit-scrollbar {
  display: none;
}

.inf-quick-key-btn {
  background: #334155;
  color: #f8fafc;
  border: 1px solid #475569;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.15s ease;
}

.inf-quick-key-btn:active {
  background: #4f46e5;
  color: #ffffff;
  transform: scale(0.95);
}

/* Pratinjau Output Code */
.inf-code-preview-wrap {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color, #e2e8f0);
  overflow: hidden;
  margin-top: 0.75rem;
}

.inf-code-preview-header {
  background: #f1f5f9;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.inf-code-preview-iframe {
  width: 100%;
  height: 140px;
  border: none;
  background: #ffffff;
}

/* 6. Simulator Jaringan & Hardware */
.inf-net-sim-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.inf-net-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  padding: 0.5rem 0;
}

.inf-net-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  min-width: 75px;
}

.inf-net-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.inf-net-icon-box.active {
  background: #22c55e;
  color: #ffffff;
  border-color: #16a34a;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.4);
}

.inf-net-pipe {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  position: relative;
  min-width: 30px;
}

.inf-net-packet {
  position: absolute;
  top: -4px;
  width: 12px;
  height: 12px;
  background: #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
  opacity: 0;
}

/* 7. AI Prompt Testing Sandbox (KKA Kemendikdasmen) */
.inf-ai-sandbox {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.3) 0%, rgba(255, 237, 213, 0.4) 100%);
  border: 1px solid #fcd34d;
  border-radius: 14px;
  padding: 1.25rem;
}

.inf-pctc-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.inf-pctc-valid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.inf-pctc-missing {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

/* 8. Tugas In-App & Auto-Save */
.inf-task-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 1.15rem;
  margin-bottom: 0.85rem;
}

.inf-auto-save-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #10b981;
  font-weight: 600;
}

/* 9. Mode Guru Sliding Drawer */
.inf-teacher-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface, #ffffff);
  border-left: 1px solid var(--border-color, #cbd5e1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.25);
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.inf-teacher-drawer.open {
  transform: translateX(0);
}

.inf-drawer-header {
  padding: 1rem 1.25rem;
  background: #1e1b4b;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inf-drawer-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
