/html/Editor-panel/css/style.css 

/* =========================
   BASE
========================= */
body {
    margin: 0;
    background: #0f172a;
    font-family: Arial, sans-serif;
    color: white;
    overflow: hidden;
}

/* =========================
   APP CONTAINER
========================= */
#app {
    position: relative;
    width: 100vw;
    height: 100vh;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* 🔥 GRID OVERLAY (toggle) */
body.grid-on #app::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image:
        linear-gradient(rgba(0,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,255,0.05) 1px, transparent 1px);

    background-size: 10px 10px;
}

/* =========================
   🔥 EDITOR VISIBILITY FIX (CRITICAL)
========================= */
#editor-panel,
#image-gallery,
#editor-status {
    display: none;
}

body.editor-on #editor-panel,
body.editor-on #image-gallery,
body.editor-on #editor-status {
    display: flex;
}

body.editor-on #editor-status {
    display: block;
}

/* =========================
   EDITOR STATUS
========================= */
#editor-status {
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 6px 12px;
    background: #020617;
    border: 1px solid #00ffff;
    color: #00ffff;
    z-index: 99999;
}

/* =========================
   PANEL (🔥 PRO)
========================= */
#editor-panel {
    position: fixed;
    left: 20px;
    top: 100px;
    background: #020617;
    border: 1px solid #00ffff;
    padding: 12px;
    z-index: 99999;
    cursor: move;
    min-width: 260px;

    flex-direction: column;
    gap: 6px;

    box-shadow: 0 0 12px rgba(0,255,255,0.25);
}

/* =========================
   HEADER
========================= */
#panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    background: #000;
    padding: 6px;
}

/* =========================
   LABELS
========================= */
#editor-panel label {
    font-size: 11px;
    color: rgba(0,255,255,0.7);
}

/* =========================
   INPUTS
========================= */
#editor-panel input,
#editor-panel select {
    width: 100%;
    background: #000;
    color: #00ffff;
    border: 1px solid #00ffff;
    padding: 6px;
    font-size: 13px;
}

/* =========================
   BUTTONS
========================= */
#editor-panel button {
    background: #00ffff;
    color: #000;
    border: none;
    padding: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

#editor-panel button:hover {
    opacity: 0.85;
}

/* 🔥 TOGGLE */
.toggle-on {
    background: #00ffff !important;
    color: #000 !important;
    box-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff;
}

.toggle-off {
    background: #111 !important;
    color: #fff !important;
}

/* =========================
   SMALL BUTTONS
========================= */
#editor-panel button.small {
    width: 48%;
    display: inline-block;
}

/* =========================
   CLOSE BUTTON
========================= */
#editor-panel span {
    color: #00ffff;
    font-weight: bold;
    cursor: pointer;
}

#editor-panel span:hover {
    color: #ffffff;
}

/* =========================
   OBJECT BASE
========================= */
.text-object,
.button-object,
.effect-object,
.image-object {
    position: absolute;
}

/* =========================
   IMAGE
========================= */
.image-object {
    z-index: 100;
    object-fit: cover;
    transition: transform 0.1s ease;
}

.image-object.locked {
    outline: 2px dashed red;
    opacity: 0.7;
}

body.editor-on .image-object:hover {
    transform: scale(1.02);
}

/* =========================
   BUTTON
========================= */
.button-object {
    z-index: 200;
    display: inline-block;
    border: 1px solid currentColor;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: bold;
}

/* =========================
   TEXT
========================= */
.text-object {
    z-index: 250;
    user-select: text;
    cursor: pointer;
}

/* =========================
   EFFECT
========================= */
.effect-object {
    z-index: 300;
    pointer-events: auto;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    border: 1px dashed rgba(0,255,255,0.2);
}

/* =========================
   SELECTED
========================= */
.selected {
    box-shadow: 0 0 0 2px #00ffff;
}

/* =========================
   HOVER EDITOR ONLY
========================= */
body.editor-on .text-object:hover,
body.editor-on .button-object:hover,
body.editor-on .image-object:hover {
    outline: 1px dashed rgba(0,255,255,0.4);
}

/* =========================
   GUIDE LINES
========================= */
.guide-x,
.guide-y {
    position: fixed;
    background: #00ffff;
    z-index: 999999;
    pointer-events: none;
}

.guide-x {
    width: 1px;
    top: 0;
    bottom: 0;
}

.guide-y {
    height: 1px;
    left: 0;
    right: 0;
}

/* =========================
   RULER
========================= */
.ruler-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: #000;
    z-index: 999999;
    border-bottom: 1px solid #00ffff;
}

.ruler-left {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 20px;
    background: #000;
    z-index: 999999;
    border-right: 1px solid #00ffff;
}

/* =========================
   IMAGE GALLERY
========================= */
#image-gallery {
    position: fixed;
    left: 50px;
    top: 150px;

    width: 320px;
    height: 300px;

    background: #020617;
    border: 1px solid #00ffff;

    flex-direction: column;

    z-index: 99999;

    box-shadow: 0 0 10px rgba(0,255,255,0.2);
}

#gallery-header {
    padding: 6px;
    background: #000;
    cursor: move;
    display: flex;
    justify-content: space-between;
}

#gallery-content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    overflow-y: auto;
}

#gallery-content::-webkit-scrollbar {
    width: 6px;
}

#gallery-content::-webkit-scrollbar-thumb {
    background: #00ffff;
}

.gallery-item {
    width: 60px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    object-fit: cover;
    transition: 0.1s;
}

.gallery-item:hover {
    border-color: #00ffff;
    transform: scale(1.05);
}
/* =========================
   🔥 PANEL GRID SYSTEM (NEW)
========================= */
.row {
    display: flex;
    gap: 8px;
}

.row > div {
    flex: 1;
}

.field {
    display: flex;
    flex-direction: column;
}

/* små knappar bredvid varandra */
.row button {
    width: 100%;
}
.row {
    display: flex;
    gap: 6px;
}

.field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#editor-panel {
    max-height: 80vh;
    overflow-y: auto;
}
/* =========================
   DISTANCE LINES (🔥 FIX)
========================= */
.distance-line {
    pointer-events: none;
    z-index: 999999 !important;
    background: #00ffcc !important;
    box-shadow: 0 0 6px #00ffcc;
    font-family: monospace;
}

