/* ==========================================================================
   BOOT SCREEN - z/OS JOB Execution Simulator
   Simula a execução de um JOB JES2 com output linha a linha.
   Completamente auto-contido; importar após mainframe-lab.css.
   ========================================================================== */

.lab-boot-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060D1A;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  opacity: 1;
  transition: opacity 800ms ease;
}

.lab-boot-screen.is-done {
  opacity: 0;
  pointer-events: none;
}

.lab-boot-screen.is-hidden {
  display: none;
}

.lab-boot-terminal {
  width: 100%;
  max-width: 720px;
  background: #0A0F1A;
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 60px rgba(0, 255, 65, 0.06),
    0 0 120px rgba(0, 255, 65, 0.03),
    0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Top and bottom bars */
.lab-boot-terminal-bar {
  background: rgba(0, 255, 65, 0.04);
  border-bottom: 1px solid rgba(0, 255, 65, 0.12);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: "Cascadia Code", "Fira Code", "Courier New", monospace;
  font-size: 11px;
  color: rgba(0, 255, 65, 0.4);
  user-select: none;
}

.lab-boot-status-bar {
  border-bottom: none;
  border-top: 1px solid rgba(0, 255, 65, 0.12);
  background: rgba(0, 255, 65, 0.03);
}

.lab-boot-terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.lab-boot-terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.lab-boot-terminal-dots span:nth-child(1) { background: rgba(239, 68, 68, 0.6); }
.lab-boot-terminal-dots span:nth-child(2) { background: rgba(234, 179, 8, 0.6); }
.lab-boot-terminal-dots span:nth-child(3) { background: rgba(34, 197, 94, 0.6); }

.lab-boot-terminal-title {
  font-family: "Cascadia Code", "Fira Code", "Courier New", monospace;
  font-size: 11px;
  color: rgba(0, 255, 65, 0.4);
  letter-spacing: 0.05em;
  flex: 1;
  text-align: center;
}

/* Scrollable output area */
.lab-boot-lines {
  position: relative;
  padding: var(--space-4) var(--space-5);
  min-height: 300px;
  max-height: 420px;
  overflow-y: auto;
  font-family: "Cascadia Code", "Fira Code", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.7;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 65, 0.15) transparent;
}

.lab-boot-lines::-webkit-scrollbar { width: 4px; }
.lab-boot-lines::-webkit-scrollbar-track { background: transparent; }
.lab-boot-lines::-webkit-scrollbar-thumb { background: rgba(0, 255, 65, 0.15); border-radius: 2px; }

/* Each output line animates in */
.lab-boot-line {
  display: block;
  white-space: pre;
  animation: boot-line-in 100ms ease-out forwards;
}

@keyframes boot-line-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Line type colors */
.lab-boot-line--header   { color: #7DD3FC; font-weight: 600; }
.lab-boot-line--separator{ color: rgba(0, 255, 65, 0.15); }
.lab-boot-line--info     { color: #94A3B8; }
.lab-boot-line--jcl      { color: #F0A500; font-weight: 500; }
.lab-boot-line--process  { color: rgba(0, 255, 65, 0.65); }
.lab-boot-line--ok       { color: #00FF41; }
.lab-boot-line--ok-bold  { color: #00FF41; font-weight: 700; letter-spacing: 0.02em; }
.lab-boot-line--empty    { min-height: 0.5em; }

/* Final READY line — glow effect */
.lab-boot-line--ready {
  color: #00FF41;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(0, 255, 65, 0.4), 0 0 20px rgba(0, 255, 65, 0.15);
}

/* Blinking cursor appended at the end */
.lab-boot-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: #00FF41;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink-cursor 1s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Scanline overlay (subtle CRT feel) */
.lab-boot-lines::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Responsive */
@media (max-width: 480px) {
  .lab-boot-lines {
    font-size: 10px;
    padding: var(--space-3);
    min-height: 240px;
    max-height: 340px;
  }
  .lab-boot-terminal {
    max-width: 100%;
  }
  .lab-boot-line--ready {
    font-size: 12px;
  }
}

/* Skip boot entirely on reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .lab-boot-screen {
    display: none !important;
  }
}
