/* ============================================================
   DEV TOOL — dev-tool.css
   ============================================================ */

/* Toggle button */
#devToggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  direction: ltr;
  background: rgba(8, 12, 16, 0.9);
  border: 1px solid rgba(255, 107, 0, 0.5);
  border-radius: 10px;
  padding: 7px 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #FF6B00;
  letter-spacing: 1px;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s;
}

/* Modal overlay */
#devModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  direction: ltr;
}

/* Panel */
#devModal .dev-panel {
  background: #0A1628;
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 16px;
  padding: 24px 28px 28px;
  width: 460px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  position: relative;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,107,0,0.05);
  direction: ltr;
}


/* Close button */
#devModalClose {
  position: absolute;
  top: 16px;
  right: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: #4A6080;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}
#devModalClose:hover { color: #FF6B00; background: rgba(255,107,0,0.1); }

/* Header row */
.dev-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.dev-main-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #FF6B00;
}

.dev-live-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(0, 200, 83, 0.12);
  color: #00C853;
  border: 1px solid rgba(0, 200, 83, 0.25);
  border-radius: 5px;
  padding: 2px 7px;
  transition: background 0.3s, color 0.3s;
}
.dev-live-badge.flash {
  background: rgba(0, 200, 83, 0.45);
  color: #fff;
}

/* Generic section block */
.dev-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.dev-section:last-child { margin-bottom: 0; }

.dev-section-orange {
  background: rgba(255, 107, 0, 0.06);
  border-color: rgba(255, 107, 0, 0.2);
}

.dev-section-desc {
  background: rgba(88, 101, 242, 0.05);
  border-color: rgba(88, 101, 242, 0.15);
}

.dev-section-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #4A6080;
  margin-bottom: 8px;
}

/* TYPE chip */
.dev-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  border-radius: 6px;
  border: 1px solid;
  padding: 3px 10px;
}

/* NAME */
.dev-name-text {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1.3;
}
.dev-ancestor-tag {
  font-size: 11px;
  font-weight: 600;
  color: #8A9BB0;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 4px;
}

/* FILES list */
.dev-files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dev-file-badge {
  font-size: 12px;
  font-weight: 600;
  color: #8A9BB0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 4px 10px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.dev-file-badge.dev-file-active {
  color: #FF6B00;
  background: rgba(255,107,0,0.12);
  border-color: rgba(255,107,0,0.4);
}

/* LINES list */
.dev-lines-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dev-line-entry {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.dlf {
  font-size: 11px;
  font-weight: 700;
  color: #FF6B00;
  min-width: 70px;
  flex-shrink: 0;
}
.dln {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.dln em {
  font-style: normal;
  font-size: 11px;
  color: #4A6080;
}

/* DESCRIPTION list */
.dev-desc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dev-desc-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.dd-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}
.dd-body {
  flex: 1;
  min-width: 0;
}
.dd-title {
  font-size: 13px;
  font-weight: 700;
  color: #C8D8E8;
  margin-bottom: 3px;
  line-height: 1.3;
  direction: rtl;
  text-align: right;
}
.dd-val {
  font-weight: 800;
  color: #fff;
}
.dd-hint {
  font-size: 11px;
  color: #4A6080;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  margin-bottom: 5px;
}
.dd-copy-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.dd-copy-label {
  font-size: 10px;
  color: #4A6080;
  font-weight: 600;
  direction: rtl;
  white-space: nowrap;
}
.dd-copy {
  display: inline-block;
  background: rgba(255, 107, 0, 0.1);
  color: #FF6B00;
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 5px;
  padding: 3px 8px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 11px;
  font-weight: 600;
  direction: ltr;
  unicode-bidi: plaintext;
  user-select: all;
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.dd-copy:hover {
  background: rgba(255, 107, 0, 0.2);
  color: #fff;
}

/* Handle bar — sits next to devToggle */
#devHandleBar {
  position: fixed;
  bottom: 24px;
  left: 110px;
  z-index: 9999;
  display: none;
  gap: 6px;
  direction: ltr;
}

#devDragHandle, #devResizeHandle {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  user-select: none;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  cursor: move;
}

#devDragHandle   { background: rgba(255, 107, 0, 0.25); }
#devDragHandle:hover, #devDragHandle.dev-handle-active   { background: rgba(255, 107, 0, 0.7); border-color: rgba(255,107,0,0.6); }
#devResizeHandle { background: rgba(88, 101, 242, 0.25); cursor: ns-resize; }
#devResizeHandle:hover, #devResizeHandle.dev-handle-active { background: rgba(88, 101, 242, 0.7); border-color: rgba(88,101,242,0.6); }

/* Drag tooltip */
#devDragTooltip {
  position: fixed;
  z-index: 10001;
  background: rgba(8, 12, 16, 0.95);
  border: 1px solid rgba(255, 107, 0, 0.5);
  border-radius: 6px;
  padding: 5px 10px;
  font-family: 'Inter', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #FF6B00;
  pointer-events: none;
  display: none;
  white-space: nowrap;
}

/* Canvas crosshair in DEV mode */
body.dev-active #bgCandleCanvas { cursor: crosshair !important; }

/* Highlight overlay */
#devHighlight {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  border: 2px solid #FF6B00;
  border-radius: 3px;
  background: rgba(255, 107, 0, 0.07);
  box-sizing: border-box;
  display: none;
  transition: top 0.1s, left 0.1s, width 0.1s, height 0.1s;
}

/* Info bar */
#devInfoBar {
  position: fixed;
  bottom: 68px;
  left: 24px;
  z-index: 9998;
  pointer-events: none;
  background: rgba(8, 12, 16, 0.95);
  border: 1px solid rgba(255, 107, 0, 0.35);
  border-radius: 8px;
  padding: 7px 12px;
  font-family: 'Inter', monospace;
  font-size: 11px;
  backdrop-filter: blur(8px);
  flex-direction: column;
  gap: 3px;
  display: none;
}
#devInfoBar .di-tag { color: #FF6B00; font-weight: 700; }
#devInfoBar .di-size { color: #4A6080; font-weight: 500; }

/* Scrollbar inside panel */
#devModal .dev-panel::-webkit-scrollbar { width: 4px; }
#devModal .dev-panel::-webkit-scrollbar-track { background: transparent; }
#devModal .dev-panel::-webkit-scrollbar-thumb { background: rgba(255,107,0,0.3); border-radius: 2px; }
