/* =============================================================
   DROMEL DEV — INTERACTION LAYER
   Four optional concepts promoted into the main experience.
============================================================= */

/* 01 — Robot diagnostics */
.robot-diagnostics { isolation: isolate; }
.robot-hotspot {
  position: absolute; z-index: 7; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--orange); background: rgba(26,26,26,.9); color: var(--orange);
  display: grid; place-items: center; cursor: pointer; font: 800 9px Consolas, monospace;
  box-shadow: 0 0 0 5px rgba(224,161,94,.08); transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.robot-hotspot::before { content: ""; position: absolute; inset: -8px; border: 1px dashed rgba(224,161,94,.2); border-radius: 50%; }
.robot-hotspot:hover, .robot-hotspot:focus-visible, .robot-hotspot.is-active { transform: scale(1.12); background: var(--orange); color: #1a1a1a; box-shadow: 0 0 0 7px rgba(224,161,94,.12); }
.robot-hotspot--head { left: 37%; top: 21%; }
.robot-hotspot--core { left: 62%; top: 48%; }
.robot-hotspot--field { left: 31%; top: 70%; }
.robot-readout {
  position: absolute; z-index: 8; left: 14px; right: 14px; bottom: 44px; min-height: 54px;
  display: flex; align-items: center; padding: 10px 13px; border: 1px solid rgba(153,161,175,.25); border-left: 3px solid var(--green);
  background: rgba(21,22,21,.92); color: #cbc7bf; font: 700 10px/1.45 Consolas, monospace; backdrop-filter: blur(5px);
}
.robot-readout b { color: var(--orange); }

/* Header command launcher */
.command-launch {
  min-width: 42px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: rgba(30,31,30,.82); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font: 700 11px Consolas, monospace;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.command-launch:hover, .command-launch:focus-visible { color: var(--orange); border-color: rgba(224,161,94,.55); background: #252624; }
.command-launch span { font-size: 12px; opacity: .75; }

/* 02 — Command palette */
body.command-open { overflow: hidden; }
.command-palette[hidden] { display: none; }
.command-palette { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: start center; padding: min(16vh, 150px) 18px 40px; }
.command-palette__backdrop { position: absolute; inset: 0; background: rgba(10,11,10,.78); backdrop-filter: blur(7px); }
.command-palette__panel {
  position: relative; width: min(680px, 100%); max-height: min(650px, 76vh); overflow: hidden; border: 1px solid #4a4d49; border-top-color: rgba(224,161,94,.6);
  border-radius: 16px; background: #1b1c1b; box-shadow: 0 28px 80px rgba(0,0,0,.45);
}
.command-palette__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 20px 16px; border-bottom: 1px solid #353835; }
.command-palette__head h2 { margin: 5px 0 0; font-size: clamp(22px, 4vw, 34px); }
.command-close { border: 1px solid #444744; border-radius: 7px; background: transparent; color: #9fa29d; padding: 7px 9px; cursor: pointer; font: 800 9px Consolas, monospace; }
.command-search { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 4px; margin: 14px; border: 1px solid #3c3f3b; border-radius: 10px; background: #171817; color: var(--orange); }
.command-search > span { padding-left: 12px; font: 800 12px Consolas, monospace; }
.command-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); padding: 15px 14px 15px 4px; font: 700 13px Consolas, monospace; }
.command-search:focus-within { border-color: rgba(224,161,94,.55); box-shadow: inset 0 0 0 1px rgba(224,161,94,.12); }
.command-results { max-height: 370px; overflow-y: auto; padding: 0 10px 10px; }
.command-result { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; text-align: left; border: 0; border-radius: 9px; padding: 11px 12px; background: transparent; color: #c9c5bd; cursor: pointer; }
.command-result:hover, .command-result.is-selected { background: #282a27; color: var(--orange); }
.command-result__code { color: var(--orange); font: 800 10px Consolas, monospace; }
.command-result strong, .command-result small { display: block; }
.command-result strong { font-size: 14px; color: inherit; }
.command-result small { margin-top: 2px; color: #858a84; font-size: 11px; }
.command-result kbd { border: 1px solid #414440; border-radius: 5px; padding: 3px 6px; background: #1b1c1b; color: #969b95; font: 800 9px Consolas, monospace; }
.command-empty { padding: 28px 14px; color: #858a84; font: 700 11px Consolas, monospace; }
.command-palette__hint { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding: 11px 20px; border-top: 1px solid #353835; color: #777d77; font: 700 9px Consolas, monospace; }
.command-palette__hint span:nth-child(3n+1) { color: #b5b1aa; }

/* 03 — Project scanner */
.project-card__media { isolation: isolate; }
.project-scan { position: absolute; inset: 0; z-index: 5; opacity: 0; pointer-events: none; transition: opacity .22s ease; overflow: hidden; background: linear-gradient(90deg, rgba(26,26,26,.38), transparent 45%, rgba(224,161,94,.05)); }
.project-card:hover .project-scan, .project-card:focus-within .project-scan { opacity: 1; }
.project-scan__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(224,161,94,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(224,161,94,.08) 1px, transparent 1px); background-size: 26px 26px; mask-image: radial-gradient(circle at var(--scan-x, 50%) 50%, #000 0, transparent 68%); }
.project-scan__line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--orange); box-shadow: 0 0 12px rgba(224,161,94,.6); }
.project-scan__line::after { content: ""; position: absolute; left: var(--scan-x, 50%); top: -3px; width: 7px; height: 7px; border: 1px solid var(--orange); border-radius: 50%; transform: translateX(-50%); background: #1a1a1a; }
.project-scan__data { position: absolute; left: 12px; bottom: 12px; display: grid; gap: 3px; max-width: calc(100% - 24px); padding: 8px 10px; border-left: 2px solid var(--orange); background: rgba(20,21,20,.9); color: #c7c2b9; font: 700 9px/1.35 Consolas, monospace; }
.project-scan__data span:first-child { color: var(--orange); }
.project-scan__coords { color: #889087; }
.project-scan__cross { position: absolute; color: rgba(224,161,94,.55); font: 400 16px Consolas, monospace; }
.project-scan__cross--a { left: 10px; top: 8px; }.project-scan__cross--b { right: 10px; top: 8px; }

/* 04 — Lab signal */
.lab-signal { margin-top: 22px; display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: center; padding: 24px; border: 1px solid #454844; border-radius: 16px; background: #202120; overflow: hidden; position: relative; }
.lab-signal::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(101,137,99,.05) 6px); }
.lab-signal__radar { width: 92px; height: 92px; margin: auto; border: 1px solid rgba(101,137,99,.8); border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--orange); font: 900 17px Consolas, monospace; box-shadow: inset 0 0 0 18px rgba(101,137,99,.04); }
.lab-signal__radar::before, .lab-signal__radar::after, .lab-signal__radar i { content: ""; position: absolute; border: 1px solid rgba(101,137,99,.22); border-radius: 50%; }
.lab-signal__radar::before { inset: -12px; }.lab-signal__radar::after { inset: -24px; }.lab-signal__radar i:first-of-type { inset: 50% 2px auto; border: 0; height: 1px; background: rgba(101,137,99,.35); transform-origin: left center; width: 47%; }
.lab-signal__copy { position: relative; z-index: 1; }
.lab-signal__copy h3 { margin: 5px 0 7px; font-size: 21px; }
.lab-signal__copy > p:last-child { margin: 0; color: var(--muted); font: 700 11px/1.55 Consolas, monospace; }
.lab-signal__button { position: relative; z-index: 1; white-space: nowrap; }
.lab-signal.is-receiving .lab-signal__radar { animation: signal-pulse .65s ease; }
.lab-signal.is-receiving .lab-signal__radar i:first-of-type { animation: signal-sweep .75s ease; }
@keyframes signal-pulse { 50% { box-shadow: inset 0 0 0 18px rgba(101,137,99,.12), 0 0 0 10px rgba(101,137,99,.07); } }
@keyframes signal-sweep { from { transform: rotate(0); } to { transform: rotate(320deg); } }

@media (max-width: 900px) {
  .robot-hotspot { width: 26px; height: 26px; }
  .lab-signal { grid-template-columns: 100px 1fr; }
  .lab-signal__button { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 620px) {
  .command-launch { display: none; }
  .robot-readout { bottom: 38px; font-size: 9px; }
  .robot-hotspot--head { left: 34%; top: 20%; }.robot-hotspot--core { left: 63%; top: 49%; }.robot-hotspot--field { left: 28%; top: 68%; }
  .lab-signal { grid-template-columns: 1fr; text-align: left; }
  .lab-signal__radar { margin: 4px 0 12px 18px; }
  .command-palette { padding-top: 74px; }
  .command-palette__panel { max-height: 80vh; }
}
@media (hover: none) {
  .project-scan { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .robot-hotspot, .project-scan, .lab-signal__radar, .lab-signal__radar i { transition: none !important; animation: none !important; }
}
