
.efp-product-library-row{display:grid;grid-template-columns:minmax(0,1fr) 28px;gap:4px;margin-bottom:4px}
.efp-product-library-row .efp-product-place{display:block;text-align:left;white-space:normal;min-width:0}
.efp-product-library-row .efp-product-place span{display:block;font-weight:700;overflow:hidden;text-overflow:ellipsis}
.efp-product-library-row .efp-product-place small{display:block;opacity:.7;font-size:9px}
.efp-product-upload-modal{display:none;position:fixed;inset:0;z-index:100080;background:rgba(0,0,0,.55);align-items:center;justify-content:center}
.efp-product-upload-modal.is-open{display:flex}
.efp-product-upload-dialog{width:min(560px,92vw);background:#fff;border-radius:4px;box-shadow:0 12px 42px rgba(0,0,0,.3)}
.efp-product-upload-head,.efp-product-upload-actions{display:flex;align-items:center;justify-content:space-between;padding:12px 15px;border-bottom:1px solid #ddd}
.efp-product-upload-actions{justify-content:flex-end;gap:6px;border-top:1px solid #ddd;border-bottom:0}
.efp-product-upload-head h2{margin:0}.efp-product-upload-close{border:0;background:transparent;font-size:24px;cursor:pointer}
.efp-product-upload-body{padding:14px}.efp-product-upload-body label{display:block;margin-bottom:9px;font-size:12px}.efp-product-upload-body input{width:100%;box-sizing:border-box;margin-top:3px}
.efp-product-dims{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.efp-product-upload-feedback{min-height:18px;color:#b32d2e;font-weight:600}
.efp-3d-product-item{box-sizing:border-box;border:2px solid #5b86ad;background:rgba(91,134,173,.26);cursor:move;user-select:none}
.efp-3d-product-item.is-dragging{outline:2px solid #ed1b2f;outline-offset:2px}
.efp-product-footprint-label{position:absolute;left:3px;top:3px;right:3px;font:700 10px Arial,sans-serif;color:#24435f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.efp-front-3d-product-item{box-sizing:border-box;border:1px solid rgba(56,90,120,.8);background:rgba(91,134,173,.18);pointer-events:none}
.efp-front-3d-product-item span{font:700 9px Arial,sans-serif;color:#24435f;padding:2px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Keep HTML hit targets and CAD details in place; draw all product boxes in
   shared SVG coordinates so fractional positions do not resize CSS borders. */
.efp-product-footprints-layer{
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    max-width:none;
    overflow:visible;
    pointer-events:none;
    shape-rendering:geometricPrecision;
}
.efp-product-footprints-layer *{pointer-events:none}
.efp-product-footprint-shape{fill:rgba(91,134,173,.26);stroke:#5b86ad}
.efp-product-footprint-selection{display:none;fill:none;stroke:#ed1b2f;stroke-width:1;stroke-dasharray:3 2}
.efp-product-footprint[data-selection="selected"] .efp-product-footprint-selection,
.efp-product-footprint[data-selection="preview"] .efp-product-footprint-selection{display:block}
.efp-product-footprint[data-selection="preview"] .efp-product-footprint-selection{stroke:#2271b1}
.efp-floor-image .efp-3d-product-item.efp-product-vector-item{border-color:transparent;background:transparent;outline:none !important}
.efp-3d-product-item.efp-product-vector-item::after{display:none !important}

/* GLB product placement interaction.
 * The visual footprint remains true-to-scale, while a small invisible halo
 * makes tiny products much easier to grab without changing their dimensions. */
.efp-3d-product-item{
    overflow:visible;
    touch-action:none;
}
.efp-3d-product-item::before{
    content:"";
    position:absolute;
    inset:-6px;
    background:transparent;
    pointer-events:auto;
}
.efp-3d-product-item.is-dragging{
    cursor:grabbing;
    outline:2px solid #ed1b2f;
    outline-offset:3px;
}
.efp-product-footprint-label{
    pointer-events:none;
}

/* Right-click menu for placed 3D products. */
.efp-product-context-menu{
    position:fixed;
    z-index:100200;
    min-width:145px;
    padding:4px;
    background:#fff;
    border:1px solid #c3c4c7;
    border-radius:3px;
    box-shadow:0 5px 18px rgba(0,0,0,.22);
}
.efp-product-context-menu button{
    display:block;
    width:100%;
    border:0;
    background:#fff;
    padding:7px 9px;
    text-align:left;
    cursor:pointer;
    font-size:12px;
}
.efp-product-context-menu button:hover{
    background:#f0f0f1;
}
.efp-product-context-menu button.is-danger{
    color:#b32d2e;
}
.efp-product-context-menu button:disabled{
    opacity:.55;
    cursor:default;
}

/* Placed 3D/CAD products must not carry permanent controls/menus.
   The footprint itself is the drag target; actions live only in right-click. */
.efp-3d-product-item .efp-product-footprint-label{
    display:none !important;
}
.efp-product-context-menu{
    display:none;
}
.efp-product-context-title{
    padding:6px 9px;
    margin:-4px -4px 4px;
    border-bottom:1px solid #dcdcde;
    background:#f6f7f7;
    font-size:11px;
    font-weight:700;
    color:#1d2327;
    white-space:nowrap;
    max-width:220px;
    overflow:hidden;
    text-overflow:ellipsis;
}


/* v0.1.29 — placed 3D/CAD products are right-click only.
   Legacy rotate/delete controls must never be visible on the footprint. */
.efp-3d-product-item > button,
.efp-3d-product-item .efp-product-rotate,
.efp-3d-product-item .efp-product-delete,
.efp-3d-product-item .efp-product-remove,
.efp-3d-product-item [class*="product-rotate"],
.efp-3d-product-item [class*="product-delete"] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.efp-product-context-menu {
    display: none;
    visibility: hidden;
}

.efp-product-context-menu[style*="display: block"],
.efp-product-context-menu[style*="display:block"] {
    visibility: visible;
}


/* v0.1.30 — full 3D product verification importer */
.efp-product-upload-modal{
    padding:24px;
}
.efp-product-import-dialog{
    width:min(1480px,96vw);
    max-height:94vh;
    display:flex;
    flex-direction:column;
    overflow:hidden;
}
.efp-product-import-dialog .efp-product-upload-head{
    flex:0 0 auto;
    padding:16px 20px;
}
.efp-product-import-dialog .efp-product-upload-head > div:first-child{
    min-width:0;
}
.efp-product-import-dialog .efp-product-upload-head h2{
    font-size:25px;
    line-height:1.15;
}
.efp-product-import-dialog .efp-product-upload-head p{
    margin:4px 0 0;
    color:#50575e;
    font-size:13px;
}
.efp-product-import-main{
    display:grid;
    grid-template-columns:minmax(0,1fr) 390px;
    min-height:0;
    flex:1 1 auto;
}
.efp-product-preview-panel{
    min-width:0;
    min-height:0;
    background:#22282e;
    padding:14px;
    display:flex;
    flex-direction:column;
}
.efp-product-preview-toolbar{
    display:flex;
    gap:12px;
    align-items:flex-start;
    justify-content:space-between;
    margin-bottom:10px;
}
.efp-product-preview-hint{
    max-width:440px;
    border:1px solid rgba(255,255,255,.09);
    background:rgba(12,16,20,.62);
    border-radius:5px;
    padding:10px 12px;
    color:#fff;
}
.efp-product-preview-hint strong,
.efp-product-preview-hint span{
    display:block;
}
.efp-product-preview-hint strong{
    font-size:14px;
    margin-bottom:3px;
}
.efp-product-preview-hint span{
    font-size:11px;
    line-height:1.5;
    opacity:.82;
}
.efp-product-preview-status{
    color:#dce5ec;
    font-size:11px;
    padding:7px 9px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:4px;
    white-space:nowrap;
}
.efp-product-preview-stage{
    position:relative;
    min-height:460px;
    flex:1 1 auto;
    overflow:hidden;
    border-radius:5px;
    background:
      linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
      linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px),
      #252c32;
    background-size:36px 36px;
}
.efp-product-preview-3d{
    position:absolute;
    inset:0;
}
.efp-product-preview-empty{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    color:#fff;
    pointer-events:none;
}
.efp-product-preview-empty strong{font-size:18px}
.efp-product-preview-empty span{opacity:.65;font-size:12px}
.efp-product-preview-stage.has-model .efp-product-preview-empty{display:none}
.efp-product-preview-views{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:6px;
    margin-top:10px;
}
.efp-product-preview-views button,
.efp-product-orientation-actions button{
    border:1px solid #c3c4c7;
    background:#fff;
    min-height:36px;
    cursor:pointer;
    font-weight:600;
}
.efp-product-preview-views button{
    background:#171c21;
    color:#dbe4eb;
    border-color:#39434d;
}
.efp-product-preview-views button.is-active,
.efp-product-preview-views button:hover{
    border-color:#ed1b2f;
    color:#fff;
    background:#ed1b2f;
}
.efp-product-import-settings{
    min-height:0;
    overflow:auto;
    background:#fff;
    border-left:1px solid #dcdcde;
    padding:4px 18px 18px;
}
.efp-product-setting-group{
    padding:15px 0;
    border-bottom:1px solid #e1e3e5;
}
.efp-product-setting-group:last-of-type{border-bottom:0}
.efp-product-setting-group h3{
    margin:0 0 10px;
    font-size:13px;
}
.efp-product-setting-group > label{
    display:block;
    margin-bottom:10px;
}
.efp-product-setting-group > label > span:first-child{
    display:block;
    font-weight:600;
    font-size:11px;
    margin-bottom:4px;
}
.efp-product-setting-group input[type="text"],
.efp-product-setting-group input[type="number"],
.efp-product-setting-group input[type="file"]{
    width:100%;
    box-sizing:border-box;
}
.efp-product-setting-group small{
    display:block;
    margin-top:7px;
    color:#646970;
    font-size:10px;
    line-height:1.45;
}
.efp-product-original-material-row{
    display:flex !important;
    align-items:center;
    gap:7px;
    font-size:11px;
}
.efp-product-original-material-row > span{
    margin:0 !important;
    font-weight:500 !important;
}
.efp-product-color-swatches{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:7px;
    margin:10px 0;
}
.efp-product-color-swatches button{
    aspect-ratio:1;
    border-radius:4px;
    border:2px solid transparent;
    background:var(--swatch);
    box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);
    cursor:pointer;
}
.efp-product-color-swatches button.is-active{
    border-color:#2271b1;
}
.efp-product-custom-color{
    display:grid;
    grid-template-columns:46px 1fr;
    gap:7px;
}
.efp-product-custom-color input[type="color"]{
    width:46px;
    height:34px;
    padding:2px;
}
.efp-product-custom-color input[type="text"]{
    height:34px;
}
.efp-product-orientation-values{
    display:flex;
    gap:7px;
    margin-bottom:9px;
}
.efp-product-orientation-values span{
    background:#f0f0f1;
    border-radius:3px;
    padding:4px 7px;
    font-size:10px;
}
.efp-product-orientation-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
}
.efp-product-orientation-actions button:first-child,
.efp-product-orientation-actions .efp-product-orientation-reset{
    grid-column:1/-1;
}
.efp-product-orientation-actions button:hover{
    border-color:#ed1b2f;
}
.efp-product-upload-feedback{
    margin-top:10px;
    min-height:18px;
    font-size:11px;
}
.efp-product-import-dialog .efp-product-upload-actions{
    flex:0 0 auto;
    padding:12px 18px;
}
.efp-product-import-dialog .efp-product-upload-save{
    min-width:150px;
}
.efp-product-import-dialog .efp-product-upload-save:disabled{
    opacity:.45;
}
@media(max-width:1050px){
    .efp-product-import-main{grid-template-columns:1fr 330px}
    .efp-product-preview-stage{min-height:390px}
}
@media(max-width:820px){
    .efp-product-upload-modal{padding:8px}
    .efp-product-import-main{display:block;overflow:auto}
    .efp-product-preview-panel{min-height:520px}
    .efp-product-import-settings{overflow:visible;border-left:0}
}


/* v0.1.31 — product actions are shown ONLY via right-click context menu. */
.efp-product-context-menu{
    display:none !important;
    visibility:hidden !important;
    position:fixed;
    z-index:2147483000;
}
.efp-product-context-menu.is-open{
    display:block !important;
    visibility:visible !important;
}


/* v0.1.42 — Shift multi-selection for placed Product Library items. */
.efp-3d-product-item.is-multi-selected{
    outline:2px solid #ed1b2f !important;
    outline-offset:2px;
}
.efp-3d-product-item.is-multi-selected::after{
    content:'';
    position:absolute;
    inset:-5px;
    border:1px dashed rgba(237,27,47,.72);
    pointer-events:none;
    box-sizing:border-box;
}
