/* =============================================================
   0 DELAY OS · Support-Konsole — Aussehen
   Erbt die Farben der Seite aus :root (--cyan, --blue, --panel …).
   Alle Klassen beginnen mit .odc- und kollidieren daher nicht
   mit dem restlichen Stylesheet.
   ============================================================= */

.odc {
  --odc-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --odc-flaeche: rgba(3, 8, 18, .94);
  --odc-kante: rgba(0, 210, 255, .22);
  --odc-kante-hell: rgba(0, 210, 255, .45);
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Startknopf ---------- */

.odc-launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 13px 20px 13px 17px;
  border: 1px solid var(--odc-kante);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(10, 18, 34, .96), rgba(3, 8, 18, .96));
  color: #f7fbff;
  font: 600 .875rem/1 Inter, system-ui, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.odc-launcher:hover,
.odc-launcher:focus-visible {
  transform: translateY(-2px);
  border-color: var(--odc-kante-hell);
  box-shadow: 0 20px 52px rgba(0, 0, 0, .55), 0 0 34px rgba(0, 210, 255, .18);
}

.odc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28c840;
  box-shadow: 0 0 0 3px rgba(40, 200, 64, .16);
  animation: odcPuls 2s ease-in-out infinite;
}

@keyframes odcPuls {
  0%, 100% { box-shadow: 0 0 0 3px rgba(40, 200, 64, .16); }
  50% { box-shadow: 0 0 0 6px rgba(40, 200, 64, .04); }
}

.odc-offen .odc-launcher { opacity: 0; pointer-events: none; }

/* ---------- Konsole ---------- */

.odc-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(384px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--odc-kante);
  border-radius: 24px;
  background: var(--odc-flaeche);
  backdrop-filter: blur(18px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .62), 0 0 60px rgba(0, 114, 255, .1);
  opacity: 0;
  transform: translateY(14px) scale(.98);
  transform-origin: 100% 100%;
  transition: opacity .2s ease, transform .2s ease;
}

/* Muss stärker sein als .odc-panel{display:flex}, sonst wirkt [hidden] nicht */
.odc-panel[hidden] { display: none; }

.odc-offen .odc-panel { opacity: 1; transform: none; }

/* ---------- Kopfzeile ---------- */

.odc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding: 15px 15px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .012);
}

.odc-lights { display: flex; gap: 7px; }
.odc-lights i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.odc-lights i:nth-child(1) { background: #ff5f57; }
.odc-lights i:nth-child(2) { background: #febc2e; }
.odc-lights i:nth-child(3) { background: #28c840; }

.odc-titel {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #aeeaff;
  font: 500 .7rem/1 var(--odc-mono);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.odc-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9fb0c7;
  font: 500 .66rem/1 var(--odc-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.odc-neu,
.odc-zu {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: #9fb0c7;
  cursor: pointer;
  transition: color .18s ease;
}

.odc-neu {
  font: 500 .66rem/1 var(--odc-mono);
  letter-spacing: .04em;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
}

.odc-zu { width: 26px; height: 26px; }
.odc-zu svg { width: 16px; height: 16px; }

.odc-neu:hover, .odc-zu:hover,
.odc-neu:focus-visible, .odc-zu:focus-visible { color: #00d2ff; border-color: var(--odc-kante-hell); }

/* ---------- Verlauf ---------- */

.odc-verlauf {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 16px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 210, 255, .25) transparent;
}

.odc-verlauf::-webkit-scrollbar { width: 8px; }
.odc-verlauf::-webkit-scrollbar-thumb { background: rgba(0, 210, 255, .2); border-radius: 99px; }

.odc-msg {
  max-width: 90%;
  margin-bottom: 12px;
  padding: 12px 15px;
  border-radius: 16px;
  font-size: .875rem;
  line-height: 1.62;
  animation: odcRein .24s ease both;
}

@keyframes odcRein {
  from { opacity: 0; transform: translateY(6px); }
}

.odc-msg p { margin: 0; }
.odc-msg p + p { margin-top: .7em; }
.odc-msg strong { color: #ffffff; font-weight: 650; }

.odc-bot {
  border: 1px solid rgba(255, 255, 255, .07);
  border-left: 2px solid rgba(0, 210, 255, .38);
  background: rgba(255, 255, 255, .03);
  color: #dbe6f5;
}

.odc-warnung {
  border-left-color: #febc2e;
  background: rgba(254, 188, 46, .05);
}

.odc-user {
  margin-left: auto;
  border: 1px solid rgba(0, 210, 255, .3);
  background: linear-gradient(135deg, rgba(0, 114, 255, .28), rgba(0, 210, 255, .16));
  color: #f7fbff;
}

/* „prüfe ▍" statt hüpfender Punkte — passt zur Konsole */
.odc-warte {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #7f93ab;
  font: 500 .74rem/1 var(--odc-mono);
  letter-spacing: .06em;
}

.odc-warte i {
  width: 7px;
  height: 13px;
  background: #00d2ff;
  animation: odcBlink 1s steps(2, end) infinite;
}

@keyframes odcBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- Knöpfe ---------- */

.odc-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.odc-knopf {
  padding: 8px 13px;
  border: 1px solid rgba(0, 210, 255, .26);
  border-radius: 999px;
  background: rgba(0, 210, 255, .05);
  color: #cfe9ff;
  font: 500 .78rem/1.3 Inter, system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.odc-knopf:hover,
.odc-knopf:focus-visible {
  transform: translateY(-1px);
  border-color: var(--odc-kante-hell);
  background: rgba(0, 210, 255, .12);
}

.odc-knopf-stark {
  border-color: transparent;
  background: linear-gradient(135deg, #0072ff, #00d2ff);
  color: #02040b;
  font-weight: 650;
}

.odc-knopf-stark:hover { background: linear-gradient(135deg, #0a80ff, #2adcff); }

/* ---------- Der Scan-Report ---------- */

.odc-report {
  margin-bottom: 12px;
  padding: 16px 16px 15px;
  border: 1px solid rgba(0, 210, 255, .28);
  border-radius: 16px;
  background: rgba(0, 20, 38, .6);
  font-family: var(--odc-mono);
  animation: odcRein .28s ease both;
}

.odc-r-kopf {
  margin-bottom: 12px;
  color: #28c840;
  font-size: .7rem;
  letter-spacing: .06em;
}

.odc-r-raster {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: .715rem;
  line-height: 1.45;
}

.odc-r-feld { color: #64798f; letter-spacing: .07em; }
.odc-r-wert { color: #aeeaff; }

.odc-r-linie {
  height: 1px;
  margin: 14px 0 13px;
  background: linear-gradient(90deg, rgba(0, 210, 255, .35), transparent);
}

.odc-r-ergebnis { display: grid; gap: 5px; }

.odc-r-marke {
  color: #28c840;
  font-size: .7rem;
  letter-spacing: .06em;
}

.odc-r-titel {
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.odc-r-preis {
  color: #00d2ff;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}

/* ---------- Eingabezeile ---------- */

.odc-eingabe {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
  padding: 13px 15px 15px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.odc-eingabe input {
  flex: 1;
  min-width: 0;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: #f7fbff;
  font: 400 .84rem/1.2 Inter, system-ui, sans-serif;
}

.odc-eingabe input::placeholder { color: #6d7f95; }
.odc-eingabe input:focus {
  outline: none;
  border-color: var(--odc-kante-hell);
  background: rgba(0, 210, 255, .06);
}

.odc-eingabe button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0072ff, #00d2ff);
  color: #02040b;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.odc-eingabe button svg { width: 19px; height: 19px; }
.odc-eingabe button:hover { transform: scale(1.06); filter: brightness(1.08); }

/* ---------- Tastatur-Fokus sichtbar halten ---------- */

.odc :focus-visible {
  outline: 2px solid #00d2ff;
  outline-offset: 2px;
}

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 560px) {
  .odc { right: 16px; bottom: 16px; }
  .odc-panel {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
  }
  .odc-msg { max-width: 94%; }
}

/* ---------- Schongang: gleiche Regel wie der Rest der Seite ---------- */

html.gpu-off-mode .odc-panel { backdrop-filter: none; background: #03080f; }
html.gpu-off-mode .odc-dot,
html.gpu-off-mode .odc-warte i { animation: none; }
html.gpu-off-mode .odc-msg,
html.gpu-off-mode .odc-report { animation: none; }
html.gpu-off-mode .odc-launcher:hover,
html.gpu-off-mode .odc-knopf:hover,
html.gpu-off-mode .odc-eingabe button:hover { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .odc-panel, .odc-msg, .odc-report, .odc-launcher, .odc-knopf, .odc-eingabe button {
    transition: none;
    animation: none;
  }
  .odc-dot, .odc-warte i { animation: none; }
}
