/* Slovorez Studio (beta) — advanced editor overlay */

.vlc-studio-open {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
    margin: 10px 0 0;
    padding: 12px 16px;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #3730a3;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.vlc-studio-open:hover { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.vlcs-beta {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #4f46e5;
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
}

body.vlcs-open { overflow: hidden; }

.vlcs-overlay[hidden] { display: none; }

.vlcs-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
    color: #0f172a;
    font-family: inherit;
}

/* Top bar */
.vlcs-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    background: #0f172a;
    color: #e2e8f0;
    flex-wrap: wrap;
}
.vlcs-title { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.vlcs-top-group { display: inline-flex; align-items: center; gap: 6px; }
.vlcs-top-right { margin-left: auto; }
.vlcs-zoom-label { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
.vlcs-artboard-size { font-size: 13px; color: #94a3b8; }
.vlcs-artboard-size input {
    width: 64px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #e2e8f0;
    font-size: 13px;
}
.vlcs-error { color: #fca5a5; font-size: 13px; font-weight: 600; }

.vlcs-btn {
    border: 1px solid #334155;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.2;
}
.vlcs-btn:hover:not(:disabled) { background: #334155; }
.vlcs-btn:disabled { opacity: 0.4; cursor: default; }
.vlcs-apply { background: #4f46e5; border-color: #4f46e5; font-weight: 700; }
.vlcs-apply:hover:not(:disabled) { background: #4338ca; }
.vlcs-close { font-weight: 700; }

/* Body layout */
.vlcs-body { display: flex; flex: 1; min-height: 0; }

.vlcs-tools {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 8px;
    background: #e2e8f0;
    border-right: 1px solid #cbd5e1;
    align-items: center;
    overflow-y: auto;
}
.vlcs-tools-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 700; }
.vlcs-tool {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #0f172a;
}
.vlcs-tool:hover { border-color: #4f46e5; color: #4f46e5; }

.vlcs-canvas-wrap { position: relative; flex: 1; min-width: 0; }
.vlcs-canvas { width: 100%; height: 100%; display: block; background: #f1f5f9; cursor: default; touch-action: none; outline: none; }
.vlcs-hint {
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    margin: 0;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    border-radius: 999px;
    font-size: 12.5px;
    pointer-events: none;
    white-space: nowrap;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Canvas internals */
.vlcs-artboard { fill: #ffffff; stroke: #cbd5e1; stroke-width: 0.4; }
.vlcs-artboard-shadow { fill: rgba(15, 23, 42, 0.12); }
.vlcs-grid { stroke: rgba(100, 116, 139, 0.16); stroke-width: 0.3; }
.vlcs-ruler { fill: #94a3b8; font-family: inherit; }
.vlcs-object { cursor: move; }
.vlcs-sel-box { fill: none; stroke: #4f46e5; }
.vlcs-sel-stem { stroke: #4f46e5; }
.vlcs-handle { fill: #ffffff; stroke: #4f46e5; cursor: pointer; }
.vlcs-handle-rot { cursor: grab; }
.vlcs-guide { stroke: #ec4899; stroke-width: 0.6; stroke-dasharray: 3 2; }

/* Side panel */
.vlcs-side {
    width: 300px;
    background: #ffffff;
    border-left: 1px solid #cbd5e1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vlcs-side h3 { margin: 4px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; }
.vlcs-muted { color: #94a3b8; font-size: 13.5px; margin: 0; }
.vlcs-onecolor { color: #94a3b8; font-size: 12px; margin: auto 0 0; padding-top: 10px; }

.vlcs-props { display: flex; flex-direction: column; gap: 8px; }
.vlcs-prop { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; color: #475569; font-weight: 600; }
.vlcs-prop input, .vlcs-prop select {
    padding: 7px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    color: #0f172a;
    background: #fff;
}
.vlcs-prop input[type="range"] { padding: 0; border: 0; }
.vlcs-prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vlcs-prop-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.vlcs-prop-grow { flex: 1; }
.vlcs-style { width: 38px; text-align: center; font-weight: 700; background: #f8fafc; color: #0f172a; border-color: #cbd5e1; }
.vlcs-style-on { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.vlcs-small { font-size: 12.5px; padding: 6px 10px; background: #f8fafc; color: #0f172a; border-color: #cbd5e1; }
.vlcs-small:hover:not(:disabled) { background: #eef2ff; }

.vlcs-layers { display: flex; flex-direction: column; gap: 4px; }
.vlcs-layer {
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vlcs-layer:hover { border-color: #a5b4fc; }
.vlcs-layer-active { border-color: #4f46e5; background: #eef2ff; font-weight: 600; }

/* Note in configurator design control when a Studio design is active */
.vlcs-note {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
    padding: 10px 12px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    font-size: 13.5px;
    color: #3730a3;
}
.vlcs-note button {
    border: 1px solid #a5b4fc;
    background: #fff;
    color: #4338ca;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}
.vlcs-note button:hover { background: #e0e7ff; }

/* Hide the text-entry controls of a design driven by Studio */
.vlc-studio-mode label:has(> .vlc-design-text),
.vlc-studio-mode .vlc-advanced { display: none; }

@media (max-width: 900px) {
    .vlcs-side { width: 240px; }
    .vlcs-tool { width: 38px; height: 38px; font-size: 17px; }
}

/* Studio je dostupan samo na računalu (širok ekran + miš) */
.vlc-studio-desktop-only { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed #c7d2fe; border-radius: 10px; background: #f5f7ff; color: #3730a3; font-size: 13px; line-height: 1.45; }
.vlc-studio-desktop-only[hidden] { display: none; }
@media (max-width: 1023px), (pointer: coarse) { .vlc-studio-open { display: none !important; } }
