﻿.inv-builder {
    display: flex;
    height: calc(100vh - 72px);
    overflow: hidden;
    background: #f0f2f5;
    margin: -1.5rem -1.5rem 0 -1.5rem;
    border-radius: 20px;
}

.inv-sidebar {
    overflow-y: auto;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.inv-sidebar-left {
    width: 220px;
    min-width: 220px;
    border-right: 1px solid #e0e0e0;
}

.inv-sidebar-right {
    width: 280px;
    min-width: 280px;
    border-left: 1px solid #e0e0e0;
}

.inv-canvas-wrap {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    /* justify-content: center; */
    padding: 24px;
}

.inv-zoom-layer {
    transform-origin: top center; /* cực kỳ quan trọng */
}

.inv-canvas {
    position: relative;
    flex-shrink: 0;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.inv-el {
    position: absolute;
    box-sizing: border-box;
    cursor: move;
    touch-action: none;
}

.inv-el.is-selected {
    outline: 2px solid #0d6efd;
    outline-offset: 1px;
}

.inv-el.is-locked {
    cursor: not-allowed;
}

.el-btn-delete {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dc3545;
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 20;
    line-height: 1;
}

.el-resize-dot {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 10px;
    height: 10px;
    background: #0d6efd;
    border-radius: 2px;
    z-index: 20;
    pointer-events: none;
}

.sec-title {
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.field-card {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 12px;
}

.field-card:hover:not(.is-added):not(.is-disabled) {
    background: #e7f1ff;
    border-color: #0d6efd;
}

.field-card.is-added {
    opacity: 0.5;
    cursor: default;
}

.field-card.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    color: #6c757d;
}

.upload-zone:hover, .upload-zone.dz-over {
    border-color: #0d6efd;
    background: #f0f6ff;
}

.guide {
    position: absolute;
    background: #00c4ff;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease; /* 👈 mượt */
}

.guide-x {
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
}

.guide-y {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
}
