/* =====================================================================
   Training4Linux — Lesson Terminal Styles
   Only loaded on lesson.php. Slate + Amber theme.
   ===================================================================== */

/* ── Section wrapper ── */
.lesson-terminal-section {
  margin: 3rem 0;
}
.lesson-terminal-section > .eyebrow { color: var(--t4l-amber-dark); }
.lesson-terminal-section > h2 { font-size: 1.85rem; margin-bottom: .5rem; }
.lesson-terminal-section > p  { color: var(--study-muted, #4a5580); margin-bottom: 1.5rem; }

/* ── Module header bar (above monitor) ── */
.t4l-module-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--t4l-slate-800, #1a2035);
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--t4l-slate-600, #374165);
  border-bottom: none;
}
.t4l-module-badge {
  background: transparent;
  border: 1px solid var(--t4l-amber, #f59e0b);
  color: var(--t4l-amber, #f59e0b);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 5px;
  font-weight: 500;
}
.t4l-module-title {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
}
.t4l-prog-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.t4l-task-dots {
  display: flex;
  gap: 4px;
}
.t4l-task-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--t4l-slate-600, #374165);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--t4l-slate-400, #6b7ab0);
  transition: all .2s;
}
.t4l-task-dot.done   { background: #052e16; border-color: #22c55e; color: #4ade80; }
.t4l-task-dot.active { border-color: var(--t4l-amber, #f59e0b); color: var(--t4l-amber, #f59e0b); }
.t4l-prog-bar {
  width: 120px;
  height: 5px;
  background: var(--t4l-slate-700, #253050);
  border-radius: 99px;
  overflow: hidden;
}
.t4l-prog-fill {
  height: 100%;
  background: var(--t4l-amber, #f59e0b);
  border-radius: 99px;
  transition: width .5s ease;
  width: 0%;
}
.t4l-prog-label {
  font-size: 12px;
  color: var(--t4l-slate-400, #6b7ab0);
  font-family: var(--font-mono);
  min-width: 36px;
  text-align: right;
}

/* ── Monitor bezel ── */
.t4l-monitor-bezel {
  background: #111827;
  border: 2px solid var(--t4l-slate-700, #253050);
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 0 0 5px #0d1117, 0 18px 48px rgba(0,0,0,.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.t4l-monitor-stand {
  width: 56px;
  height: 9px;
  background: #1f2937;
  border-radius: 0 0 5px 5px;
  margin: 0 auto;
}

/* ── Terminal chrome ── */
.t4l-term-topbar {
  background: #1c2333;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2d3748;
  flex-shrink: 0;
}
.t4l-term-dots { display: flex; gap: 6px; }
.t4l-term-dot  { width: 11px; height: 11px; border-radius: 50%; }
.t4l-term-dot.red    { background: #ff5f57; }
.t4l-term-dot.yellow { background: #febc2e; }
.t4l-term-dot.green  { background: #28c840; }
.t4l-term-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #6b7280;
  flex: 1;
  text-align: center;
}

/* ── Task prompt bar ── */
.t4l-task-bar {
  background: var(--t4l-slate-800, #1a2035);
  border-bottom: 1px solid var(--t4l-slate-700, #253050);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.t4l-task-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--t4l-amber, #f59e0b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--t4l-ink, #0a0f1e);
  font-weight: 700;
  flex-shrink: 0;
  transition: background .3s;
}
.t4l-task-num.complete { background: #22c55e; color: #052e16; }
.t4l-task-prompt {
  font-size: 12.5px;
  color: #e2e8f0;
  font-family: var(--font-mono);
  flex: 1;
}
.t4l-task-prompt em { color: var(--t4l-amber, #f59e0b); font-style: normal; }
.t4l-term-btn {
  background: transparent;
  border: 1px solid var(--t4l-slate-600, #374165);
  color: var(--t4l-slate-300, #8d9bc4);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all .15s;
  line-height: 1.4;
}
.t4l-term-btn:hover { border-color: var(--t4l-amber, #f59e0b); color: var(--t4l-amber, #f59e0b); }

/* ── Output area ── */
.t4l-term-output {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  background: #050912;
  min-height: 240px;
  max-height: 380px;
  scrollbar-width: thin;
  scrollbar-color: var(--t4l-slate-700, #253050) transparent;
}
.t4l-term-output::-webkit-scrollbar { width: 4px; }
.t4l-term-output::-webkit-scrollbar-track { background: transparent; }
.t4l-term-output::-webkit-scrollbar-thumb { background: var(--t4l-slate-700, #253050); border-radius: 99px; }

/* ── Output line types ── */
.t-line { margin-bottom: 1px; display: flex; flex-wrap: wrap; }
.t-prompt       { color: var(--t4l-amber, #f59e0b); }
.t-prompt-path  { color: #64748b; }
.t-prompt-dollar{ color: #4ade80; margin-right: 8px; }
.t-cmd     { color: #f1f5f9; }
.t-out     { color: #94a3b8; }
.t-info    { color: #22d3ee; }
.t-success { color: #4ade80; }
.t-error   { color: #f87171; }
.t-warn    { color: #fbbf24; }
.t-hint    { color: #a78bfa; }
.t-comment { color: #374165; }
.t-perm-r  { color: var(--t4l-amber, #f59e0b); }
.t-perm-w  { color: #f87171; }
.t-perm-x  { color: #4ade80; }
.t-perm-n  { color: #374165; }
.t-dir     { color: #22d3ee; }
.t-exe     { color: #4ade80; }
.t-hidden  { color: #374165; }

.term-success-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  background: rgba(20,83,45,.45);
  border: 1px solid #22c55e;
  border-radius: 5px;
  padding: 7px 12px;
  color: #4ade80;
  font-size: 12px;
  width: 100%;
}
.term-success-banner > span:first-child { flex-shrink: 0; }
.term-banner-star { background: rgba(245,158,11,.15); border-color: var(--t4l-amber, #f59e0b); color: var(--t4l-amber, #f59e0b); }

/* ── Input row ── */
.t4l-input-row {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  border-top: 1px solid #1f2937;
  background: #070d1a;
  flex-shrink: 0;
}
.t4l-input-prompt {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--t4l-amber, #f59e0b);
  white-space: nowrap;
  flex-shrink: 0;
}
.t4l-term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: #f1f5f9;
  caret-color: var(--t4l-amber, #f59e0b);
  padding: 0 8px;
}
.t4l-term-input::placeholder { color: #374165; }
.t4l-input-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #374165;
  white-space: nowrap;
}

/* ── Sidebar task list (optional, inside lesson sidebar) ── */
.t4l-task-list { margin-top: .5rem; }
.t4l-task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 5px;
  border: 1px solid transparent;
  transition: all .15s;
}
.t4l-task-item.done   { background: #052e16; border-color: #166534; opacity: .8; }
.t4l-task-item.active { background: var(--t4l-slate-800, #1a2035); border-color: var(--t4l-amber, #f59e0b); }
.t4l-task-item.locked { opacity: .4; }
.t4l-task-icon {
  width: 20px; height: 20px;
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
}
.t4l-task-icon.done   { background: #22c55e; color: #052e16; }
.t4l-task-icon.active { background: var(--t4l-amber, #f59e0b); color: var(--t4l-ink, #0a0f1e); }
.t4l-task-icon.locked { background: var(--t4l-slate-700, #253050); color: var(--t4l-slate-400, #6b7ab0); }
.t4l-task-text strong { display: block; font-size: 12px; font-weight: 600; color: #f1f5f9; margin-bottom: 2px; }
.t4l-task-text span   { color: var(--t4l-slate-400, #6b7ab0); font-size: 11.5px; line-height: 1.4; display: block; }

@media (max-width: 767px) {
  .t4l-term-topbar .t4l-term-title { display: none; }
  .t4l-term-output { font-size: 12px; max-height: 300px; }
  .t4l-module-header { flex-wrap: wrap; gap: 8px; }
  .t4l-prog-wrap { margin-left: 0; width: 100%; }
  .t4l-prog-bar  { flex: 1; }
}
