/* ============================================================
   DIPON STUDIO NEXT-GEN — Millimeter Ruler Styles
   ============================================================ */

/* Top-Left Corner Box (Unit Switcher) */
.ruler-corner {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  background: #11121c;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  z-index: 30;
  transition: background 0.15s;
}

.ruler-corner:hover {
  background: var(--bg-surface-elevated);
  color: #fff;
}

/* Horizontal Top Ruler */
.ruler-top-wrap {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  width: 100%;
  height: var(--ruler-thickness);
  position: relative;
  overflow: hidden;
  z-index: 25;
}

#rulerTopCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Vertical Left Ruler */
.ruler-left-wrap {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  width: var(--ruler-thickness);
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 25;
}

#rulerLeftCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Live Coordinate Badge in Bottom-Right of Viewport */
.live-coord-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(16, 18, 26, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  z-index: 20;
}
