/* ==================================================
   PENTEST TERMINAL
   Shared styling for the AI Pentest and Attack Lab
   apps. Both are terminals: a scope selector, a run
   button, and a live log. Everything else on those
   screens was removed.
   ================================================== */

/* IMPORTANT: this rule must NOT set `display`.
   style.css has `.screen { display: none }` and `.screen.active { display: block }`.
   Both are single-class selectors, exactly like `.pentest-terminal`, and this file
   loads AFTER style.css - so a `display` here would beat `display: none` and leave
   both terminals permanently visible, painted over the phone (they are
   position:absolute/inset:0). Display is therefore enabled only while active. */
.pentest-terminal {
  flex-direction: column;
  gap: 10px;
  /* 64px top clears the 50px phone status bar; .screen uses 65px for the same reason. */
  padding: 64px 14px 24px;
  background: #060a12;
  color: #d6f5ee;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  box-sizing: border-box;
}

.pentest-terminal.active {
  display: flex;
}

.pentest-terminal .defender-heading h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.4px;
}

.pentest-terminal .defender-heading p {
  margin: 2px 0 0;
  font-size: 11px;
  color: #6f8f8a;
}

.pentest-terminal .defender-badge {
  align-self: flex-start;
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #1d4b45;
  color: #38e8d0;
  background: rgba(56, 232, 208, 0.08);
  white-space: nowrap;
}

.pentest-terminal .defender-badge[data-state="running"] {
  color: #ffd166;
  border-color: #6b5520;
  background: rgba(255, 209, 102, 0.1);
}

.pentest-terminal .defender-badge[data-state="error"] {
  color: #ff8a8a;
  border-color: #6b2626;
  background: rgba(255, 138, 138, 0.1);
}

/* ---- scope selector ---- */

.pt-scope {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pt-scope-button {
  flex: 1 1 auto;
  min-width: 84px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid #1d3a44;
  background: rgba(255, 255, 255, 0.03);
  color: #9fc4be;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pt-scope-button.active {
  border-color: #38e8d0;
  color: #06120f;
  background: #38e8d0;
  font-weight: 700;
}

/* ---- controls ---- */

.pt-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pt-label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6f8f8a;
  margin-bottom: 3px;
}

.pentest-terminal select,
.pentest-terminal input {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid #1d3a44;
  background: #0b1220;
  color: #d6f5ee;
  font-family: inherit;
  font-size: 12px;
}

.pt-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pt-actions button,
.pt-actions a {
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #1d3a44;
  background: rgba(255, 255, 255, 0.04);
  color: #d6f5ee;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.pt-actions button:disabled {
  opacity: 0.5;
  cursor: progress;
}

.pt-actions button.primary,
.pt-actions a.primary {
  border-color: #38e8d0;
  background: #38e8d0;
  color: #06120f;
  font-weight: 700;
}

.pt-status {
  margin: 0;
  font-size: 11px;
  color: #9fc4be;
  min-height: 15px;
}

.pt-hint {
  margin: 0;
  font-size: 11px;
  color: #6f8f8a;
}

.pt-hint code {
  color: #38e8d0;
}

/* ---- interactive prompt ---- */

.pt-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #1d4b45;
  background: #04080e;
}

.pt-prompt-label {
  color: #38e8d0;
  font-size: 11.5px;
  white-space: nowrap;
}

.pentest-terminal .pt-prompt input {
  flex: 1 1 auto;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #bff5e9;
  font-size: 11.5px;
  outline: none;
}

.pentest-terminal .pt-prompt input::placeholder {
  color: #4d6b66;
}

/* ---- the terminal itself ---- */

.pt-terminal {
  flex: 1 1 auto;
  margin: 0;
  padding: 12px;
  min-height: 240px;
  max-height: 46vh;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #14262b;
  background: #04080e;
  color: #bff5e9;
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.pt-terminal .term-ok,
.pt-terminal .term-vuln {
  color: #ff8a8a;
}
