.mapa-item {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    transform: translate(-50%, -50%);
    padding: 6px;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    color: var(--text-color);
}

.salon-mapa-canvas--editor .mapa-item {
    cursor: grab;
}

.salon-mapa-canvas--editor .mapa-item:active {
    cursor: grabbing;
}

.mapa-item.is-selected {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.mapa-item--mesa {
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.mapa-item--mesa.is-libre {
    border-color: var(--success-color);
    background: #f3fff4;
}

.mapa-item--mesa.is-ocupada {
    border-color: var(--danger-color-dark);
    background: #fff1f1;
}

.mapa-item--missing {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #94a3b8;
    box-shadow: none;
}

.mapa-item--missing .mapa-item-sub {
    color: #94a3b8;
}

.mapa-item--pulse {
    position: relative;
}

.mapa-item--pulse::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: inherit;
    border: 2px solid rgba(var(--primary-rgb), 0.35);
    opacity: 0;
    animation: mapaPulse 0.65s ease;
    pointer-events: none;
}

.mapa-item--mesa.is-libre.mapa-item--pulse::after {
    border-color: rgba(34, 197, 94, 0.35);
}

.mapa-item--mesa.is-ocupada.mapa-item--pulse::after {
    border-color: rgba(220, 38, 38, 0.35);
}

@keyframes mapaPulse {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }
    40% {
        opacity: 0.9;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

.mapa-item--barra {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-color-dark) 100%);
    border-radius: 14px;
    border: 2px solid rgba(0,0,0,0.12);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.mapa-item--columna {
    background: #e5e7eb;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    color: #374151;
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.mapa-item--texto {
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    border: 1px dashed rgba(0,0,0,0.22);
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.mapa-item .mapa-item-sub {
    margin-top: 2px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--text-color-light);
}
