/* Floating Toolbar */

.floating-toolbar-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #f0f0f0;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border: 1px solid #e0e0e0;
    cursor: grab;
    transition: all 0.3s ease;
    min-width: 720px;
    max-width: 90vw;
    overflow: hidden;
}

.floating-toolbar-container:active {
    cursor: grabbing;
}

.floating-toolbar-container.collapsed {
    min-height: 44px;
}

.floating-toolbar-container.collapsed .floating-toolbar-content {
    display: none;
}

/* Estructura principal */
.floating-toolbar-content {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 0px;
    min-height: 44px;
}

/* Contenedor de herramientas */
.floating-toolbar-tools {
    display: flex;
    align-items: center;
    flex: 1;
    height: 44px;
    border-radius: 8px;
    background: #f0f0f0;
    margin-right: 0px;
    overflow: hidden;
}

.floating-toolbar .tool_buttons {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0px;
    width: 100%;
    justify-content: space-around;
}

.floating-toolbar .tool_button {
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: none;
    font-size: 18px;
    background-position: center;
    background-repeat: no-repeat;
    color: #555555;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

.floating-toolbar .tool_button:hover {
    background-color: #e0e0e0;
    color: #333333;
}

.floating-toolbar .tool_button:focus {
    outline: none;
    background-color: #e8e8e8;
}

.floating-toolbar .tool_button.selected,
.floating-toolbar .tool_button:active {
    background-color: #d0d0d0;
    color: #222222;
}

/* Separadores entre herramientas */
.floating-toolbar .tool_button:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: #d0d0d0;
}

/* Tooltip */
.floating-toolbar .tool_button::before {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1001;
}

.floating-toolbar .tool_button:hover::before {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    .floating-toolbar-container {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        min-width: auto;
        max-width: calc(100vw - 20px);
    }

    .floating-toolbar-content {
        padding: 6px 8px;
        gap: 6px;
    }

    .floating-toolbar .tool_button {
        width: 40px;
        height: 40px;
        background-size: 18px 18px;
        font-size: 8px;
    }

    .floating-toolbar-control {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .floating-toolbar .tool_button {
        width: 36px;
        height: 36px;
        background-size: 16px 16px;
        font-size: 7px;
    }
}

/* Animaciones */
@keyframes slideInUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.floating-toolbar-container.show {
    animation: slideInUp 0.3s ease-out;
}

/* Estilos específicos para las herramientas IFC */
.floating-toolbar .tool_button.BIMInspectorTool {
    background-image: url('../images/bim_inspector.svg');
}

.floating-toolbar .tool_button.BIMLayoutTool {
    background-image: url('../images/bim_layout.svg');
}

.floating-toolbar .tool_button.BIMResetViewTool {
    background-image: url('../images/reset_view.svg');
}

.floating-toolbar .tool_button.BIMExplodeTool {
    background-image: url('../images/explode.svg');
}

.floating-toolbar .tool_button.BIMDeltaTool {
    background-image: url('../images/delta.svg');
}

.floating-toolbar .tool_button.BIMInventoryTool {
    background-image: url('../images/inventory.svg');
}

.floating-toolbar .tool_button.SVGExporterTool {
    background-image: url('../images/export.svg');
}