
/* Estilos para el módulo estructural */
#structural-panel {
    position: absolute;
    top: 0;
    bottom: var(--bottom-bar-height, 48px);
    left: 0;
    width: 250px;
    background: white;
    padding: 10px;
    border-right: 1px solid #ccc;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: calc(100vh - var(--bottom-bar-height, 48px));
    overflow-y: auto;
    font-family: Arial, sans-serif;
    display: none; /* Oculto por defecto, se activa con botón */
}

/* Header fijo dentro del panel estructural (título + X) */
#structural-panel .panel-header-sticky {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    /* Compensa el padding del panel para que quede pegado arriba */
    margin: -10px -10px 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

#structural-toggle-btn {
    position: fixed;
    top: 116px;
    right: 20px;
    z-index: 3000;
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Botones de herramientas (4 botones en cuadrícula) */
.structural-tools-grid {
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

#structural-panel .structural-tool-btn {
    width: 100%;
    margin: 0;
    padding: 8px 6px;
    font-size: 11px;
    line-height: 1.15;
    cursor: pointer;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    text-align: center;
}

#structural-panel .structural-tool-btn:hover {
    filter: brightness(0.95);
}

.structural-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.structural-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    text-align: center;
}
.structural-item:hover { background: #f0f0f0; }
.structural-item img { width: 100%; height: 30px; object-fit: contain; display: block; margin: 0 auto 2px auto; }
.structural-item span { font-size: 10px; display: block; margin-top: 2px; }

.structure-list-item {
    border-bottom: 1px solid #eee;
    padding: 5px 0;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.structure-list-item.selected { background-color: #e6f7ff; }

.control-group { margin-bottom: 8px; }
.control-group label { display: block; font-size: 11px; font-weight: bold; }
.control-group input[type="range"] { width: 100%; }
.control-group input[type="number"] { width: 60px; }

/* Estilo para el modo "colocando" */
.leaflet-container.cursor-crosshair {
    cursor: crosshair !important;
}

.structure-icon-wrapper {
    position: relative;
    /* transition: width 0.1s, height 0.1s; transform handled by inline style */
}
