/* ==========================================================================
   Looking Glass — Cyber Diagnostics Console (lowpings.ro Style)
   Edge-lit cards, rounded-full controls, responsive mobile terminal
   ========================================================================== */

/* Target preset quick-chips */
.presets {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-family: var(--lp-font-mono);
  color: var(--lp-text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 32px;
}

.preset-chip:hover {
  color: #fff;
  border-color: var(--lp-line-strong);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

/* Diagnostic Action Form */
.lgform {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.lgform input[type=text] {
  flex: 1 1 280px;
  min-width: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: var(--lp-text);
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-pill);
  padding: 10px 18px;
  font-family: var(--lp-font-mono);
  font-size: 13.5px;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}

.lgform input[type=text]:focus {
  border-color: var(--lp-line-strong);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06), inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.lgform input[type=text]::placeholder {
  color: var(--lp-text-dim);
}

.btn-stop {
  color: var(--lp-down);
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
}

.btn-stop:hover:not(:disabled) {
  border-color: var(--lp-down);
  color: #fff;
  background: rgba(248, 113, 113, 0.25);
}

/* ==========================================================================
   Cyber Terminal Window
   ========================================================================== */

.term-frame {
  margin-top: 18px;
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius-panel);
  background: #000000;
  background-image: var(--lp-edge);
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.7);
  width: 100%;
}

.term-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--lp-line-soft);
  font-family: var(--lp-font-mono);
  font-size: 11px;
  color: var(--lp-text-dim);
  gap: 8px;
}

.term-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.term-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.term-dots .dot-r { background: #f87171; opacity: 0.8; }
.term-dots .dot-y { background: #fbbf24; opacity: 0.8; }
.term-dots .dot-g { background: #34d399; opacity: 0.8; }

.term-title {
  color: var(--lp-text-faint);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.term {
  padding: 14px 16px;
  min-height: 150px;
  max-height: 420px;
  overflow-y: auto;
  font-family: var(--lp-font-mono);
  font-size: 12px;
  line-height: 1.65;
  color: var(--lp-text-soft);
  white-space: pre-wrap;
  word-break: break-all;
  tab-size: 4;
  -webkit-overflow-scrolling: touch;
}

.term::-webkit-scrollbar {
  width: 6px;
}

.term::-webkit-scrollbar-track {
  background: transparent;
}

.term::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

.term .cmd {
  color: var(--lp-info);
  font-weight: 600;
}

.term .err {
  color: var(--lp-down);
  font-weight: 500;
}

.term .dim {
  color: var(--lp-text-dim);
}

.term .hdr {
  color: var(--lp-text);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: block;
}

.term:empty::before {
  content: "system ready · select ping, traceroute, or mtr above";
  color: var(--lp-text-dim);
  font-style: italic;
}

/* ==========================================================================
   Speedtest Meters
   ========================================================================== */

.meter {
  height: 7px;
  border-radius: var(--lp-radius-pill);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-top: 14px;
  position: relative;
}

.meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--lp-radius-pill);
  background: linear-gradient(90deg, #3b82f6, var(--lp-info));
  box-shadow: 0 0 12px var(--lp-info-glow);
  transition: width 0.22s ease-out;
}

.meter.up i {
  background: linear-gradient(90deg, #8b5cf6, var(--lp-violet));
  box-shadow: 0 0 12px var(--lp-violet-glow);
}

/* ==========================================================================
   CLI Command Snippets
   ========================================================================== */

.cmds {
  margin: 0;
  font-family: var(--lp-font-mono);
  font-size: 12.5px;
  line-height: 1.8;
}

.cmds dt {
  color: var(--lp-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 16px;
  font-family: var(--lp-font);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cmds dt:first-child {
  margin-top: 0;
}

.cmds dd {
  margin: 6px 0 0;
  color: var(--lp-text-soft);
  word-break: break-all;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--lp-line-soft);
  border-radius: var(--lp-radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  transition: border-color 0.2s;
}

.cmds dd:hover {
  border-color: var(--lp-line);
}

.cmds dd span.code-text {
  flex: 1;
}

.note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--lp-text-muted);
  line-height: 1.65;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lp-line-soft);
  border-radius: var(--lp-radius-panel);
}

/* Mobile Tweaks */
@media (max-width: 640px) {
  .lgform {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .lgform input[type=text] {
    grid-column: 1 / -1;
    width: 100%;
    margin-bottom: 2px;
  }
  .lgform .btn {
    width: 100%;
    padding: 10px 8px;
    font-size: 12px;
    min-height: 42px;
  }
  .presets {
    justify-content: flex-start;
    gap: 6px;
  }
  .preset-chip {
    padding: 4px 10px;
    font-size: 11px;
  }
  .term {
    min-height: 130px;
    max-height: 280px;
    font-size: 11px;
    padding: 10px 12px;
  }
  .cmds dd {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    font-size: 11.5px;
  }
  .cmds dd .copy-btn {
    align-self: flex-end;
  }
}
