/* ========================================================= */
/* HISTORY GO – CONSOLE.CSS (retro terminalstil)             */
/* ========================================================= */

#devConsole {
  font-family: "Courier New", monospace;
  background: radial-gradient(circle at 50% 120%, #000 0%, #010a10 100%);
  color: #00ff6a;
  text-shadow: 0 0 6px rgba(0,255,120,0.4);
  border-top: 1px solid rgba(0,255,120,0.2);
  box-shadow: 0 -4px 25px rgba(0,255,120,0.1);
  animation: consoleFadeIn 0.3s ease-out forwards;
}

/* Output-tekst */
#devConsole div {
  line-height: 1.45;
  word-break: break-word;
}

/* Skrollbar del */
#devConsole > div:first-child {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,255,120,0.3) transparent;
}
#devConsole > div:first-child::-webkit-scrollbar {
  width: 6px;
}
#devConsole > div:first-child::-webkit-scrollbar-thumb {
  background: rgba(0,255,120,0.3);
  border-radius: 3px;
}

/* Input-felt */
#devConsole textarea {
  background: rgba(0,255,100,0.05);
  border: 1px solid rgba(0,255,100,0.25);
  color: #9cffb7;
  caret-color: #00ff6a;
  font-size: 13px;
  font-family: inherit;
  border-radius: 6px;
  margin-top: 6px;
  box-shadow: 0 0 10px rgba(0,255,100,0.1) inset;
  transition: background .2s ease, box-shadow .2s ease;
}

#devConsole textarea:focus {
  background: rgba(0,255,100,0.08);
  box-shadow: 0 0 12px rgba(0,255,120,0.2) inset;
  outline: none;
}

/* Blinkende markør (kun visuell dekorasjon) */
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.blink {
  display: inline-block;
  width: 6px;
  height: 14px;
  background: #00ff6a;
  margin-left: 3px;
  animation: blink 1s infinite;
}

/* Fade-inn ved åpning */
@keyframes consoleFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Feilmeldinger */
#devConsole .error {
  color: #ff5555;
  text-shadow: 0 0 6px rgba(255,100,100,0.6);
}

/* Tidsstempel (hvis aktivert senere) */
.timestamp {
  color: rgba(0,255,120,0.4);
  font-size: 11px;
}


/* ===================================================== */
/* HISTORY GO – DEV CONSOLE STYLES (v2.2)                */
/* ===================================================== */
.hg-console{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 42vh;
  display: none;
  flex-direction: column;
  background: rgba(0,0,0,.92);
  border-top: 1px solid rgba(255,255,255,.2);
  z-index: 999999;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.hg-console-output{
  flex: 1;
  padding: 8px 10px;
  overflow-y: auto;
  color: #c6ffc6;
  line-height: 1.35;
  scrollbar-width: thin;
}

.hg-console-input{
  width: 100%;
  height: 48px;
  resize: none;
  border: 1px solid rgba(255,255,255,.2);
  border-left: 0; border-right: 0;
  outline: none;
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 8px 10px;
  font: 13px ui-monospace, Menlo, Consolas, monospace;
}

.hg-log { white-space: pre-wrap; word-break: break-word; }
.hg-log .ts { color:#8fd18f; margin-right: 6px; }
.hg-log.cmd { color:#9fd2ff; }
.hg-log.warn { color:#ffd37a; }
.hg-log.error{ color:#ff9f9f; }

@media (max-width: 600px){
  .hg-console{ height: 52vh; }
  .hg-console-input{ height: 56px; }
}

/* ===================================================== */
/* Diagnoseknapp – vises kun i dev-modus (?dev=1)        */
/* ===================================================== */
.hg-console-btn {
  position: fixed;
  bottom: 12px;
  right: 12px;
  background: rgba(0,255,120,0.12);
  border: 1px solid rgba(0,255,120,0.35);
  color: #00ff6a;
  font-size: 18px;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  z-index: 999999;
  box-shadow: 0 0 12px rgba(0,255,120,0.25);
  transition: background .2s ease, transform .2s ease;
}
.hg-console-btn:hover {
  background: rgba(0,255,120,0.2);
  transform: translateY(-2px);
}
.hg-console-btn:active {
  transform: translateY(0);
}
