/* ============================================================
   Multi-Course Classroom Tracks Stylesheet
   Tracks: SQL, Python, Web Dev, IoT / Arduino
   ============================================================ */

/* Track Badges & Pills */
.track-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.track-pill-sql {
  background: rgba(2, 132, 199, 0.12);
  color: var(--primary);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.track-pill-python {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.track-pill-web {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.track-pill-iot {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ============================================================
   TRACK 2: PYTHON IDE WORKSPACE
   ============================================================ */
.track-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--bg-main);
}

.track-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.track-workspace-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  overflow: hidden;
  height: calc(100% - 48px);
}

@media (max-width: 900px) {
  .track-workspace-split {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}

.code-editor-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.code-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.code-textarea {
  flex: 1;
  width: 100%;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  background: var(--input-bg);
  color: var(--text-main);
  border: none;
  outline: none;
  resize: none;
  tab-size: 4;
}

/* Terminal & Console */
.terminal-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #090d16;
  color: #e2e8f0;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.75rem;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
}

.terminal-body {
  flex: 1;
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-body .stdout {
  color: #f1f5f9;
}

.terminal-body .stderr {
  color: #f87171;
  font-weight: 600;
}

.terminal-body .sys-msg {
  color: #38bdf8;
  font-style: italic;
}

.terminal-body .success-msg {
  color: #34d399;
}

.terminal-input-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #111827;
  border-top: 1px solid #1f2937;
}

.terminal-input-bar input {
  flex: 1;
  background: #1f2937;
  color: #ffffff;
  border: 1px solid #374151;
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  outline: none;
}

.terminal-input-bar input:focus {
  border-color: #38bdf8;
}

/* ============================================================
   TRACK 3: WEB DEV STUDIO
   ============================================================ */
.file-tab-bar {
  display: flex;
  background: var(--bg-sub);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.file-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-tab-btn:hover {
  background: rgba(2, 132, 199, 0.05);
  color: var(--primary);
}

.file-tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.preview-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
}

.preview-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #ffffff;
}

.in-ide-console {
  height: 180px;
  border-top: 1px solid var(--border);
  background: #0b0f19;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   TRACK 4: IOT & ARDUINO VIRTUAL LAB
   ============================================================ */
.iot-circuit-board {
  display: flex;
  flex-direction: column;
  background: #0d131f;
  padding: 1.25rem;
  overflow-y: auto;
  gap: 1.25rem;
}

.virtual-arduino-box {
  background: #064e3b;
  border: 2px solid #059669;
  border-radius: 12px;
  padding: 1.25rem;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.2);
  position: relative;
}

.circuit-component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.component-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #f8fafc;
}

.led-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #334155;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  transition: all 0.2s ease;
  margin: 0 auto;
}

.led-indicator.on {
  background: #ef4444;
  box-shadow: 0 0 16px #ef4444, inset 0 2px 4px rgba(255,255,255,0.4);
}

.led-indicator.green.on {
  background: #10b981;
  box-shadow: 0 0 16px #10b981, inset 0 2px 4px rgba(255,255,255,0.4);
}

.led-indicator.blue.on {
  background: #38bdf8;
  box-shadow: 0 0 16px #38bdf8, inset 0 2px 4px rgba(255,255,255,0.4);
}

.pushbutton-control {
  background: #dc2626;
  color: white;
  border: 3px solid #991b1b;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 0 #7f1d1d;
  margin: 0 auto;
  user-select: none;
  transition: all 0.05s ease;
}

.pushbutton-control:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #7f1d1d;
}

.lcd-display-screen {
  background: #2563eb;
  color: #ffffff;
  font-family: var(--font-mono);
  padding: 0.75rem;
  border-radius: 6px;
  border: 2px solid #1d4ed8;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-shadow: 0 0 4px rgba(255,255,255,0.5);
  min-height: 48px;
}
