
/* ============================================
   Pianta Sala v2 (floorplan-editor.js)
   ============================================ */
.editor-toolbar { flex-wrap: wrap; row-gap: 6px; }
.editor-view-tools { margin-left: auto; align-items: center; }
.editor-view-tools .tool-btn { font-weight: 700; }
.editor-zoom-label {
    font-size: 11px; color: var(--color-text-muted); min-width: 38px; text-align: right;
    font-variant-numeric: tabular-nums;
}

.editor-status {
    display: none; align-items: center; flex-wrap: wrap; gap: 6px 14px;
    padding: 6px var(--space-lg);
    background: #fbfbf9; border-bottom: 1px solid var(--color-border-light);
    font-size: 12.5px; color: var(--color-text);
}
.editor-status .es-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.editor-status .es-item .btn { padding: 3px 9px; font-size: 12px; line-height: 1.2; }
.editor-status .es-warn { color: #c0392b; }
.editor-status .es-warn .btn { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c2; }
.editor-status .es-out { color: #b9770e; }
.editor-status .es-out .btn { background: #fef5e7; color: #b9770e; border: 1px solid #f8dcaa; }
.editor-status .es-ok { color: #2e7d32; }
.editor-status .es-hint { margin-left: auto; color: var(--color-text-muted); font-size: 11px; white-space: nowrap; }
@media (max-width: 900px) { .editor-status .es-hint { display: none; } }

/* Toolbar selezione: striscia chiara sopra la pianta, gruppi Allinea / Distribuisci / Dimensioni / Proprietà */
.editor-container > .multi-select-toolbar {
    margin: 0; border-radius: 0; padding: 6px 12px; gap: 4px 14px; animation: none;
    background: var(--color-surface); color: var(--color-text);
    border-bottom: 1px solid var(--color-border-light); box-shadow: none;
    justify-content: flex-start; align-items: center; flex-wrap: wrap;
}
.ms-group { display: inline-flex; align-items: center; gap: 2px; padding: 2px 0; }
.ms-group + .ms-group { border-left: 1px solid var(--color-border-light); padding-left: 12px; }
.ms-right { margin-left: auto; }
.ms-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-muted); margin-right: 6px; font-weight: 600; }
.ms-count { font-weight: 700; font-size: 13px; }
.ms-ref { font-size: 11.5px; color: var(--color-text-secondary); margin-left: 8px; }
.ms-sep { width: 1px; height: 18px; background: var(--color-border-light); margin: 0 5px; }
.ms-btn {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--color-text);
    cursor: pointer; padding: 0;
}
.ms-btn svg { width: 17px; height: 17px; display: block; }
.ms-btn:hover:not(:disabled) { background: var(--color-primary-bg); border-color: var(--color-border); }
.ms-btn:active:not(:disabled) { background: var(--color-border-light); }
.ms-btn:disabled { opacity: .3; cursor: default; }
.ms-btn.ms-text { width: auto; padding: 0 10px; font-size: 12px; font-weight: 600; background: var(--color-primary); color: #fff; }
.ms-btn.ms-text:hover { background: var(--color-primary-light); }
.ms-btn.ms-danger { color: var(--color-error); }
.ms-btn.ms-danger:hover { background: var(--color-error-bg); border-color: #f5c6c2; }
.ms-field { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--color-text-secondary); margin: 0 4px; }
.ms-field input { width: 56px; padding: 3px 5px; font-size: 12px; border: 1px solid var(--color-border); border-radius: 5px; background: #fff; color: var(--color-text); }
.ms-select { padding: 3px 5px; font-size: 12px; border: 1px solid var(--color-border); border-radius: 5px; background: #fff; color: var(--color-text); }
.editor-table-group.marquee-hit .editor-table { stroke: #2E7BC9 !important; stroke-width: 3 !important; }
@media (max-width: 900px) { .ms-label { display: none; } .ms-ref { display: none; } }

#editor-canvas { min-height: 0; overflow: hidden; touch-action: none; }
#editor-canvas svg text { user-select: none; -webkit-user-select: none; }
.editor-table-group.overlapping .editor-table { animation: fp-pulse 1.6s ease-in-out infinite; }
@keyframes fp-pulse { 0%,100% { stroke-opacity: 1; } 50% { stroke-opacity: 0.35; } }

/* Elenco tavoli nel pannello proprietà */
.table-list-filter { margin-bottom: 8px; }
.table-list-filter .form-input { width: 100%; padding: 6px 8px; font-size: 12.5px; }
.table-list { display: flex; flex-direction: column; gap: 3px; max-height: calc(100vh - 260px); overflow-y: auto; }
.table-list-item {
    display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 6px;
    width: 100%; padding: 6px 8px; text-align: left;
    background: var(--color-bg, #f8f9fa); border: 1px solid var(--color-border-light); border-radius: var(--radius-sm);
    cursor: pointer; font: inherit; font-size: 12.5px; color: var(--color-text);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.table-list-item:hover { background: #eef4fb; border-color: #bcd4ee; }
.table-list-item .tl-label { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-list-item .tl-meta { color: var(--color-text-muted); font-size: 11px; white-space: nowrap; }
.table-list-item .tl-icon { text-align: right; font-size: 12px; }
.table-list-item.tl-over { border-color: #f5c6c2; background: #fff7f6; }
.table-list-item.tl-out { border-color: #f8dcaa; background: #fffaf2; }

/* Pianta prenotazioni: canvas con sfondo neutro, la sala è il rettangolo bianco */
.floorplan-canvas { background: #f6f5f2 !important; position: relative; }
.floorplan-notice {
    position: absolute; top: 8px; left: 8px; z-index: 5;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px; font-size: 12px; color: #8a5a00;
    background: #fff8e6; border: 1px solid #f3d999; border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.floorplan-notice .btn { padding: 3px 9px; font-size: 12px; line-height: 1.2; background: #fff; border: 1px solid #e0c98a; color: #8a5a00; }
.floorplan-canvas svg { cursor: grab; }
.floorplan-canvas .table-element { cursor: pointer; }

/* Menu card "Da assegnare" */
.unassigned-menu .um-sub { font-weight: 400; font-size: 11.5px; opacity: .8; margin-top: 2px; }
.unassigned-menu .um-note { padding: 8px 12px; font-size: 12.5px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; background: #fffbea; border-bottom: 1px solid var(--color-border-light); }
.unassigned-menu .um-note.um-allergy { background: #fdecea; color: #b03a2e; font-weight: 600; }
.unassigned-card, .grid-unassigned-card { cursor: pointer; }
